Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix libuv threading issue#435

Merged
johnhaley81 merged 2 commits intomasternodegit/nodegit:masterfrom
fix-libuv-threadnodegit/nodegit:fix-libuv-threadCopy head branch name to clipboard
Feb 27, 2015
Merged

Fix libuv threading issue#435
johnhaley81 merged 2 commits intomasternodegit/nodegit:masterfrom
fix-libuv-threadnodegit/nodegit:fix-libuv-threadCopy head branch name to clipboard

Conversation

@johnhaley81
Copy link
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
Copy link

saghul commented Feb 27, 2015

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

@johnhaley81
Copy link
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!

@johnhaley81
Copy link
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 johnhaley81 self-assigned this Feb 27, 2015
@johnhaley81 johnhaley81 added this to the 0.3.0 milestone Feb 27, 2015
@johnhaley81
Copy link
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 johnhaley81 merged commit 9a859cc into master Feb 27, 2015
@johnhaley81 johnhaley81 deleted the fix-libuv-thread branch February 27, 2015 21:36
@tbranyen tbranyen modified the milestone: 0.3.0 Mar 2, 2015
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.