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

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 […]

Continue Reading