split want_run versus blocking run for ::Future
[scpubgit/Object-Remote.git] / bin / object-remote-node
index c5c9515..ed1ba32 100755 (executable)
@@ -7,16 +7,17 @@ use CPS::Future;
 
 my $c = Object::Remote::Connector::STDIO->new->connect;
 
-$c->_set_is_ready(1);
+$c->ready_future->done;
 
 my $loop = Object::Remote->current_loop;
 
 my $f = CPS::Future->new;
 
-$f->on_ready(sub { $loop->stop });
+$f->on_ready(sub { $loop->want_stop });
 
 $c->on_close($f);
 
 print { $c->send_to_fh } "Shere\n";
 
-$loop->run;
+$loop->want_run;
+$loop->run_while_wanted;