lib/polyphony/extensions/fiber.rb
# Informs the fiber's monitors it is terminated.
#
# @param result [any] fiber's return value
# @param uncaught_exception [Exception, nil] uncaught exception
# @return [void]
Informs the fiber's monitors it is terminated.
Informs the fiber ' s monitors it is terminated .
def inform_monitors(result, uncaught_exception)
      if @monitors
        msg = [self, result]
        @monitors.each_key { |f| f.monitor_mailbox << msg }
      end
      if uncaught_exception && @parent
        parent_is_monitor = @monitors&.has_key?(@parent)
        @parent.schedule_with_priority(result) unless parent_is_monitor
      end
    end
def inform_monitors ( result , uncaught_exception ) if @monitors msg = [ self , result ] @monitors . each_key { | f | f . monitor_mailbox << msg } end if uncaught_exception && @parent parent_is_monitor = @monitors &. has_key? ( @parent ) @parent . schedule_with_priority ( result ) unless parent_is_monitor end end
Informs the fiber's monitors it is terminated.
Informs the fiber ' s monitors it is terminated .
None
void
result
fiber's return value
fiber ' s return value
uncaught_exception
None