method

exclusive

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ShareLock
exclusive(purpose: nil, compatible: [], after_compatible: [], no_wait: false) public

Execute the supplied block while holding the Exclusive lock. If no_wait is set and the lock is not immediately available, returns nil without yielding. Otherwise, returns the result of the block.

See start_exclusive for other options.

Show source
Register or log in to add new notes.