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

Not sure how to get a hold of you #10

Open
levonravel opened this issue Oct 17, 2017 · 2 comments
Open

Not sure how to get a hold of you #10

levonravel opened this issue Oct 17, 2017 · 2 comments

Comments

@levonravel
Copy link

How are you getting your events from the background process to the main thread? I have been having a hard time wrapping my head around this and it looks as though your doing just this.

@GlaireDaggers
Copy link
Owner

Sorry for not responding, I have been fairly busy lately.
As far as getting events over to the main thread, I've always just used a thread-safe message pump pattern for this.
A thread-safe queue lies at the core of this, so that your networking thread enqueues messages it receives onto this queue, and then your main thread at some interval dequeues all messages on this queue and processes them.

@levonravel
Copy link
Author

levonravel commented Nov 2, 2017 via email

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

No branches or pull requests

2 participants