-
Notifications
You must be signed in to change notification settings - Fork 207
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 #187
Comments
Hey, just bumping this issue. Did you ever figure this out @mengelseatz ? |
@PepperTeasdale I haven't and there were no replies. I'm assuming it's thread safe but haven't done a deep dive into the code yet. |
It looks like it might not be: we may have accidentally charged $X to one customer that was meant for another customer. And this is the reason I'm here. For some reason, we used an organizer with a few interactions to process the credit card charges. Each charge is processed as an individual Sidekiq job, and multiple jobs can be processed in parallel in the same Ruby process. Every time I see calls like I wonder how |
Yes, Interactor is thread safe in that you can call .call from multiple threads and each call generates a new context. However, if you initialize an Interactor (i.e. call .new) then that instance is not thread safe and shouldn't be shared with multiple threads. |
I'm looking into using this library but I can't find any info on whether it's threadsafe or not? Thanks for any intel!
The text was updated successfully, but these errors were encountered: