Skip to content

Make waiting for callback result optional#1208

Merged
johnhaley81 merged 3 commits into
nodegit:masterfrom
srajko:callback-fire-forget
Feb 28, 2017
Merged

Make waiting for callback result optional#1208
johnhaley81 merged 3 commits into
nodegit:masterfrom
srajko:callback-fire-forget

Conversation

@srajko
Copy link
Copy Markdown
Collaborator

@srajko srajko commented Jan 31, 2017

No description provided.

@srajko srajko force-pushed the callback-fire-forget branch 3 times, most recently from dfb5367 to c4bda75 Compare January 31, 2017 21:38
@srajko srajko force-pushed the callback-fire-forget branch from c4bda75 to 921bf45 Compare February 13, 2017 19:12
@srajko srajko changed the title [WIP] Make waiting for callback result optional Make waiting for callback result optional Feb 24, 2017
@srajko
Copy link
Copy Markdown
Collaborator Author

srajko commented Feb 24, 2017

This change allows callback properties to be given with waitForResult: false, which will schedule the callback but not wait for its result. Instead, the default callback result will be immediately returned to libgit2.

To make sure completion callbacks get executed after intermediate callbacks, their two separate queues in ThreadPool are now a single queue.

@johnhaley81
Copy link
Copy Markdown
Collaborator

Thanks @srajko this also has the nice side effect of making the code easier to read :)

@johnhaley81 johnhaley81 merged commit d329e2b into nodegit:master Feb 28, 2017
@johnhaley81 johnhaley81 deleted the callback-fire-forget branch February 28, 2017 15:27
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

Successfully merging this pull request may close these issues.

2 participants