You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has been raised as a question several times and is worth explaining as a pony pattern.
An example from @SeanTAllen is here:
actorMainnewcreate(env: Env) =>
Supervisor(env.out).run()
actorWorkerlet _supervisor: Supervisornewcreate(supervisor: Supervisor) =>
_supervisor = supervisor
bework() =>
// do some stuff
_supervisor.done(this)
actorSupervisorlet _out: StdStreamlet _worker: Workernewcreate(out: StdStream) =>
_out = out
_worker = Worker(this)
berun() =>
_worker.work()
bedone(worker: Worker) =>
if (worker is _worker) then
_out.print("My worker finished\n")
else
_out.print("Odd, a worker that isn't mine told me it was done. Weird\n")
end
It has been raised as a question several times and is worth explaining as a pony pattern.
An example from @SeanTAllen is here:
https://playground.ponylang.org/?gist=1b8684fef6a856fcebbf3528f05214cd
The text was updated successfully, but these errors were encountered: