Open ledermann opened 13 years ago
Can someone confirm this? I've been using acts_as_scoped in Rails 2.3 app over several years now. This plugin also uses attr_accessor to store the "current" scope object and it has been working fine so far.
I pretty much dislike threadlocals, but I think that this is a good use.
Hi! Is anyone still maintaining this gem? I really think it is thread-safe and anyone using it in production in multi-threaded env should be warned. Here is a quick test:
https://gist.github.com/HakubJozak/b00d577f1703ba28dc3cff1aec514626
hey @HakubJozak, thanks for putting together the demo script and I'd be happy to fix any known issues. would you be interested in putting together a pull request to close this issue?
@wireframe PR to make multitenant thread-safe https://github.com/wireframe/multitenant/pull/19
IMHO, using
is not thread-safe. You should use
instead.