Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check context #211

Merged
merged 4 commits into from
Oct 16, 2019
Merged

Check context #211

merged 4 commits into from
Oct 16, 2019

Conversation

chrisrossi
Copy link
Contributor

When creating a top level context, check to make sure there isn't already a running context for this thread. This is an attempt to root a possible weird concurrency problem. Related to #182, but not a fix.

Chris Rossi added 2 commits September 27, 2019 10:08
already a running context for this thread. This is an attempt to root
a possible weird concurrency problem. Related to googleapis#182.
@chrisrossi chrisrossi requested a review from cguardia September 27, 2019 16:05
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 27, 2019
@andrewsg
Copy link
Contributor

Are we confident we should raise an error here instead of just silently returning the existing context?

@chrisrossi
Copy link
Contributor Author

Are we confident we should raise an error here instead of just silently returning the existing context?

No. Not 100%. But my instinct is to be more restrictive up front to prevent weird, hard to debug errors and if someone comes to us with a compelling use case we can try and figure out the best way to accommodate them.

Copy link
Contributor

@cguardia cguardia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @chrisrossi that for now more restrictive is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants