Skip to content
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

Merged
merged 4 commits into from Dec 7, 2015
Merged

Conversation

sgl0v
Copy link
Contributor

@sgl0v sgl0v commented Dec 6, 2015

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.

…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:
Copy link
Owner

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.

@artman
Copy link
Owner

artman commented Dec 6, 2015

Just a few small comments, looks good otherwise. Thanks for the contribution!

@sgl0v
Copy link
Contributor Author

sgl0v commented Dec 6, 2015

Thanks. I updated the pull request accordingly.

@artman
Copy link
Owner

artman commented Dec 6, 2015

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.
@sgl0v
Copy link
Contributor Author

sgl0v commented Dec 7, 2015

Increased the wait time to 0.2s for both tests. Unit tests shouldn't fail occasionally this time.

@artman
Copy link
Owner

artman commented Dec 7, 2015

Looks good. Thanks!

artman added a commit that referenced this pull request Dec 7, 2015
Set the dispatch queue explicitly
@artman artman merged commit f9f32f8 into artman:master Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants