Commit Graph

8 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
cb06526b10 [tests] Remove libuv dependency from the tests 2015-12-01 11:49:02 +02:00
Thiago Marcos P. Santos
ec1b4c43fd Do not force uv_loop_t as the first parameter for a threaded object ctor 2015-07-06 16:01:59 +03:00
John Firebaugh
fc64e97bce Simplify RunLoop
Instead of transforming between return value and callback, pass
the wrapped callback on to the invoked function as the last argument.

This eliminates the need for multiple invokeWithArgument overloads
and permits invoked functions to be asynchronous.
2015-07-01 16:12:12 -07:00
John Firebaugh
3670a78569 Convert Worker tests to Thread tests 2015-07-01 15:21:10 -07:00
John Firebaugh
5fadda53e5 Move WorkerTask functionality into RunLoop core
As a byproduct, this makes FileCache get requests properly
cancelable.
2015-07-01 15:21:10 -07:00
Thiago Marcos P. Santos
57ddb386d8 Add unit tests for ThreadContext 2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
a8b6b67dfe Introduce the ThreadContext
mbgl::Thread will keep a ThreadContext for each running instance
in a thread_local so we don't need to lookup a man in the Environment
every time we need some info about the current thread.

This patch is moving the ::currentlyOn check used on Debug build from
the Environment class to the ThreadContext.
2015-06-25 16:26:21 +03:00
John Firebaugh
b304b20073 Add Thread tests; get argument transfer working for all cases 2015-05-21 19:57:28 -07:00