nay / record_with_operator

Rails plugin to set created_by, updated_by, deleted_by to ActiveRecord objects. Supports associations.
MIT License
51 stars 26 forks source link

Is it thread safe in Thin, Puma ...etc? #12

Open HirokiDaido opened 6 years ago

HirokiDaido commented 6 years ago

I think, Thread.current is not safe in threaded web servers, like Thin or Puma. Maybe, it is better to use request_store gem isn't it?

nay commented 6 years ago

I think it might be trouble if you read operator before you set operator value (including nil) for each request. Yes, It would be better to use request_store gem. Thank you.

( I should update this gem but need some time... )