class AWS::Flow::Core::AsyncEventLoop
@api private
Public Class Methods
new()
click to toggle source
@api private
# File lib/aws/flow/async_scope.rb, line 178 def initialize @tasks = [] end
Public Instance Methods
<<(task)
click to toggle source
@api private
# File lib/aws/flow/async_scope.rb, line 193 def <<(task) @tasks << task end
executeQueuedTasks()
click to toggle source
Actually executes the eventLoop. @api private
# File lib/aws/flow/async_scope.rb, line 202 def executeQueuedTasks until @tasks.empty? task = @tasks.shift task.resume if task.alive? end end
fail(task, error)
click to toggle source
TODO Make sure that it’s okay to fail from the AsyncEventLoop
, and that this is the correct behavior.
# File lib/aws/flow/async_scope.rb, line 188 def fail(task, error) raise error end
remove(task)
click to toggle source
@api private
# File lib/aws/flow/async_scope.rb, line 183 def remove(task) @tasks.delete(task) end