-
Notifications
You must be signed in to change notification settings - Fork 697
Closed
Description
👋
I've been plumbing the depths of nodegit to understand how all the pieces fit together. I'm a bit concerned about the threading model.
My understanding:
- We enqueue asynchronous work with
Nan::AsyncQueueWorker. Nan::AsyncQueueWorkercallsuv_queue_work.uv_queue_workenqueues the work on a threadpool.
This means:
- We could do work on multiple threads at once.
- libgit2 says its objects shouldn't be used across multiple threads at once.
- We could end up accessing the same objects across multiple threads at once, most often the repository object.
- Potential 💥, definite violation of libgit2's threading model.
Is my understanding correct? Am I missing something?
Metadata
Metadata
Assignees
Labels
No labels