lib/plumbing/actor/async.rb in standard-procedure-plumbing-0.4.0 vs lib/plumbing/actor/async.rb in standard-procedure-plumbing-0.4.1
- old
+ new
@@ -19,11 +19,22 @@
@target.send message_name, *args, &block
end
Result.new(task)
end
+ def safely(&)
+ send_message(:perform_safely, &)
+ nil
+ end
+
+ def within_actor? = true
+
+ def stop
+ # do nothing
+ end
+
Result = Data.define(:task) do
- def await
+ def value
Timeout.timeout(Plumbing::Actor.timeout) do
task.wait
end
end
end