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

thread safety #10

Open
ghazel opened this issue Jun 28, 2011 · 1 comment
Open

thread safety #10

ghazel opened this issue Jun 28, 2011 · 1 comment

Comments

@ghazel
Copy link
Contributor

ghazel commented Jun 28, 2011

Oink is currently not thread safe. The use of class variables in the ActiveRecord instrumentation allows for two threads to step on each other. Instead, Thread.current['some_key'] should be used.

@noahd1
Copy link
Owner

noahd1 commented Jul 20, 2011

Think this commit addresses the issue you raised, though I'm not convinced that oink is completely thread-safe otherwise. I haven't tried running oink in a multi-threaded environment. One other piece of global state I'm aware of is "@oink_extended_active_record" which is accessed/set during middleware instantiation.

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

No branches or pull requests

2 participants