Skip to content

Conversation

@paralin
Copy link

@paralin paralin commented Jan 2, 2017

Add a second function ExecuteWithContext which allows passing a net.Context with a query. This context can be canceled, which in turn cancels calling all of the remaining resolver functions. Furthermore, resolver functions can also handle cancellation of the context.

This has the added benefit of guaranteeing all resolvers will be canceled if the main Execute function returns early for any reason.

Signed-off-by: Christian Stewart christian@paral.in

Add a second function `ExecuteWithContext` which allows passing a
`net.Context` with a query. This context can be canceled, which in turn
cancels calling all of the remaining resolver functions. Furthermore,
resolver functions can also handle cancellation of the context.

This has the added benefit of guaranteeing all resolvers will be
canceled if the main Execute function returns early for any reason.

Signed-off-by: Christian Stewart <christian@paral.in>
@kumarharsh kumarharsh requested a review from atrniv January 5, 2017 19:07
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.

1 participant