envato / event_sourcery

A library for building event sourced applications in Ruby
MIT License
84 stars 10 forks source link

Use a transaction level advisory lock in write events #110

Closed stevehodgkiss closed 7 years ago

stevehodgkiss commented 7 years ago

The previous version was a session level lock, which would prevent any other connection from writing events after it had ran. Also the previous version was using try, of which the return value needs to be checked. This method will pause until the lock is available in the same way that lock table does.