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
Implement new concurrent datatype Agent mostly like RefM from ZIO and looking like Ref + Semaphore (Atom + Gatekeeper) for everything else
It should have at least following methods
traitAgent[F[_], A]{
// return current value, this will never blockdefget:F[A]
// update value with effectful transformation, wait for the new resultdefupdateM(f: A=>F[A]):F[A]
// enqueue transformation, return immediatelydeffireUpdateM(f: A=>F[A]):F[Unit]
// modify value with effectful transformation, wait for the new resultdefmodifyM[B](f: A=>F[(A, B)]):F[B]
}
The text was updated successfully, but these errors were encountered:
Implement new concurrent datatype
Agent
mostly likeRefM
from ZIO and looking like Ref + Semaphore (Atom + Gatekeeper) for everything elseIt should have at least following methods
The text was updated successfully, but these errors were encountered: