Method: SQLite3::Database#busy_handler
- Defined in:
- lib/sqlite3/database.rb
#busy_handler(data = nil, &block) ⇒ Object
Register a busy handler with this database instance. When a requested resource is busy, this handler will be invoked. If the handler returns false, the operation will be aborted; otherwise, the resource will be requested again.
The handler will be invoked with the name of the resource that was busy, and the number of times it has been retried.
See also the mutually exclusive #busy_timeout.
309 310 311 312 |
# File 'lib/sqlite3/database.rb', line 309 def busy_handler( data=nil, &block ) # :yields: data, retries result = @driver.busy_handler( @handle, data, &block ) Error.check( result, self ) end |