Sha256: 1d2051c61cd9faf8f2006c2183adcfe97033432d835c86289f024782b47f3967

Contents?: true

Size: 497 Bytes

Versions: 24

Compression:

Stored size: 497 Bytes

Contents

module Concurrent
  module Actor
    module Behaviour

      # Accepts `:await` messages. Which allows to wait on Actor to process all previously send
      # messages.
      #
      #     actor << :a << :b
      #     actor.ask(:await).wait # blocks until :a and :b are processed
      class Awaits < Abstract
        def on_envelope(envelope)
          if envelope.message == :await
            true
          else
            pass envelope
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
concurrent-ruby-edge-0.6.0 lib/concurrent-ruby-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.6.0.pre1 lib/concurrent-ruby-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.5.0 lib-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.4.1 lib-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.4.0.pre2 lib-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.4.0.pre1 lib-edge/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.4 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.3.1 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.3.0 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.3 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.3.pre3 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.2 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.1 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0.pre5 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.1.2 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0.pre4 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0.pre3 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0.pre2 lib/concurrent/actor/behaviour/awaits.rb
concurrent-ruby-edge-0.2.0.pre1 lib/concurrent/actor/behaviour/awaits.rb