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

Already on GitHub? Sign in to your account

Fix issue with `around_http_request` when using multiple threads. #258

Merged
merged 1 commit into from Jan 20, 2013

Conversation

Projects
None yet
1 participant
Owner

myronmarston commented Jan 19, 2013

Fibers cannot be shared across threads, and you would get an error
when using this feature with threads:

FiberError: fiber called across threads

Actually, we were rescuing FiberError and transforming it into an even more confusing error:

Your around_http_request hook declared at must call #proceed on the yielded request but did not.

Note that VCR is not thread safe (see #200) but this brings it a bit closer.

Fixes #257.

Fix issue with `around_http_request` when using multiple threads.
Fibers cannot be shared across threads, and you would get an error
when using this feature with threads:

FiberError: fiber called across threads

Actually, we were rescuing FiberError and transforming it into an even more confusing error:

Your around_http_request hook declared at <location> must call #proceed on the yielded request but did not.

Note that VCR is not thread safe (see #200) but this brings it a bit closer.

Fixes #257.

myronmarston added a commit that referenced this pull request Jan 20, 2013

Merge pull request #258 from vcr/fix_around_http_request_hook
Fix issue with `around_http_request` when using multiple threads.

@myronmarston myronmarston merged commit d6b3058 into master Jan 20, 2013

1 check passed

default The Travis build passed
Details

@myronmarston myronmarston deleted the fix_around_http_request_hook branch Jan 20, 2013

myronmarston added a commit that referenced this pull request Jan 20, 2013

plukevdh added a commit to plukevdh/vcr that referenced this pull request Apr 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment