-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the dispatch queue explicitly #20
Conversation
…It specifies a queue to dispatch the signal fire to the listener. Added unit tests.
@@ -113,6 +113,14 @@ networkLoader.onProgress.listen(self) { (progress) in | |||
}.queueAndDelayBy(1.0) | |||
``` | |||
|
|||
A signal dispatches listener calls synchronously on the posting thread by default. To specify the thread explicitly, you should use the `dispatchOnQueue` method: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth mentioning that if you explicitly set a thread it will be called asynchronously.
Just a few small comments, looks good otherwise. Thanks for the contribution! |
Thanks. I updated the pull request accordingly. |
Travis failed on one of the asynchronous waits. Might make sense to increase the wait time to 0.2 seconds for example. |
…chQueue and testUsesCurrentQueueByDefault tests.
Increased the wait time to 0.2s for both tests. Unit tests shouldn't fail occasionally this time. |
Looks good. Thanks! |
Set the dispatch queue explicitly
A signal dispatches listener calls synchronously on the posting thread by default.
Added the
dispatchOnQueue
method to specify the queue explicitly. Updated the readme file and implemented unit tests.