Object
Perform an operation exclusively, uncontested by other tasks
Synchronize an operation across all tasks in the current actor
# File lib/celluloid/io/stream.rb, line 377 def synchronize actor = Thread.current[:celluloid_actor] return yield unless actor if @owner || @waiters > 0 @waiters += 1 @condition.wait @waiters -= 1 end @owner = Task.current begin ret = yield ensure @owner = nil @condition.signal if @waiters > 0 end ret end
Generated with the Darkfish Rdoc Generator 2.