1a1b836ded
`@valid_transitions` is shared across threads, when a thread consumes a transition, another thread which should execute the same transition for another model instance may ignore its success callback. This change avoid to share the same hash of transition across different model instances. Each instance will have its own hash of transitions. The hash itself is not subject to thread race conditions as the object ids are unique. Also, the transitions for an object_id are cleaned after the transition have been fired, otherwise the hash would grow infinitely. See https://github.com/aasm/aasm/issues/448#issuecomment-377922368 for an example of code to reproduce the multi-thread bug. Fixes #448 |
||
---|---|---|
.. | ||
invokers | ||
event.rb | ||
invoker.rb | ||
state.rb | ||
transition.rb |