lib/elevate/io_coordinator.rb
# Cancels the I/O operation (if any), raising an exception of type 
# +exception_class+ in the worker thread.
#
# If the thread is not currently blocked, then set a flag requesting cancellation.
#
# @return [void]
#
# @api private
Cancels the I/O operation (if any), raising an exception of type
+exception_class+ in the worker thread.

If the thread is not currently blocked, then set a flag requesting cancellation.
Cancels the I / O operation ( if any ) raising an exception of type + exception_class + in the worker thread . If the thread is not currently blocked then set a flag requesting cancellation .
def cancel(exception_class = CancelledError)
      blocking_operation = nil
      @lock.lock
      @cancelled = true
      @exception_class = exception_class
      blocking_operation = @blocking_operation
      @lock.unlock
      if blocking_operation
        blocking_operation.cancel
      end
    end
def cancel ( exception_class = CancelledError ) blocking_operation = nil @lock . lock @cancelled = true @exception_class = exception_class blocking_operation = @blocking_operation @lock . unlock if blocking_operation blocking_operation . cancel end end
Cancels the I/O operation (if any), raising an exception of type
+exception_class+ in the worker thread.
Cancels the I / O operation ( if any ) raising an exception of type + exception_class + in the worker thread .
None
void
exception_class
<not_specific>
api
None