Bonsai_extra_proc.One_at_a_timemodule Status = Bonsai_extra.One_at_a_time.Statusmodule Response = Bonsai_extra.One_at_a_time.Responseval effect :
('query -> 'response Effect.t) Bonsai.t ->
Bonsai.graph @ local ->
(('query -> 'response Response.t Effect.t) * Status.t) Bonsai.tTurns the input effect into an effect which ensures that only one instance of it is running at a time. If another instance of the effect is already running, then Busy is returned instead of running the effect. In addition, it also returns a value representing whether or not an instance of the effect is in progress.
CAREFUL: If the effect function raises while it is executing, then the status will stay at busy, since the computation is unable to witness that the effect completed.