examples/core/genserver.rb in polyphony-0.17 vs examples/core/genserver.rb in polyphony-0.19

- old
+ new

@@ -3,10 +3,10 @@ require 'bundler/setup' require 'polyphony' class GenServer def self.start(receiver, *args) - coprocess = coproc do + coprocess = spin do state = receiver.initial_state(*args) loop do msg = receive reply, state = receiver.send(msg[:method], state, *msg[:args]) msg[:from] << reply unless reply == :noreply \ No newline at end of file