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

Threading model#827

Copy link
Copy link
@joshaber

Description

@joshaber
Issue body actions

馃憢

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:

  1. We enqueue asynchronous work with Nan::AsyncQueueWorker.
  2. Nan::AsyncQueueWorker calls uv_queue_work.
  3. uv_queue_work enqueues the work on a threadpool.

This means:

  1. We could do work on multiple threads at once.
  2. libgit2 says its objects shouldn't be used across multiple threads at once.
  3. We could end up accessing the same objects across multiple threads at once, most often the repository object.
  4. Potential 馃挜, definite violation of libgit2's threading model.

Is my understanding correct? Am I missing something?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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