FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix libuv threading issue by johnhaley81 · Pull Request #435 · nodegit/nodegit · GitHub

Repository navigation

Fix libuv threading issue - #435

Merged
johnhaley81 merged 2 commits into
masterfrom
fix-libuv-thread
Feb 27, 2015
Merged

johnhaley81 merged 2 commits into
masterfrom
fix-libuv-thread

Conversation

Copy link
Copy Markdown
Collaborator

uv_queue_work is not thread safe

This means that all callbacks are in a highly unstable
state and can bring the system down at any time.

Now we're using an Async handle

That should make out callbacks thread safe and consistent
across platforms again

saghul commented Feb 27, 2015

Copy link
Copy Markdown

Note that uv_async_init is not thread-safe. You should initialize it from the loop thread. Only uv_async_send is thread-safe.

Copy link
Copy Markdown
Collaborator Author

Ahhh interesting. That probably should be a note for that method. I'll fix that in this PR. Thanks for the heads up @saghul!

Copy link
Copy Markdown
Collaborator Author

@saghul I put uv_async_init on the main loop thread but that seems to kill it in linux/osx.

I opened a new PR to show that. Note that Windows succeeds but linux and osx are throwing false positives on the tests.

johnhaley81 self-assigned this Feb 27, 2015
johnhaley81 added this to the 0.3.0 milestone Feb 27, 2015

Copy link
Copy Markdown
Collaborator Author

@tjfontaine was saying that we should be doing something like this.

I think I'm going to merge this for right now and tackle that later.

johnhaley81 added a commit that referenced this pull request Feb 27, 2015
johnhaley81 merged commit 9a859cc into master Feb 27, 2015
johnhaley81 deleted the fix-libuv-thread branch February 27, 2015 21:36
tbranyen modified the milestone: 0.3.0 Mar 2, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL