Ruby Ep. 7: Concurrency and avoiding race conditions with Ruby on Rails

Ruby On Rails

Video is ready, Click Here to View ×

Shows how to use the ActiveRecord method ‘lock’ which uses ‘Select for update’ in order to ensure only one process can change a database value. We also illustrate how to test with concurrent processes.

The refreshably method can be found in the Atomic Jolt lti_starter_app project here:

Code for the breakpoints can be found here:

Leave a Reply

Your email address will not be published. Required fields are marked *