Select
gopher.Select
Organize waiting for read/write from multiple async channels
Gopher[F] provide a function select
of this type.
Attributes
- Source
- Select.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Attributes
- Source
- Select.scala
Attributes
- Source
- Select.scala
run forever expression in pf
, return
transparent inline def apply[A](inline pf: PartialFunction[Any, A])(using mc: CpsMonadContext[F]): A
wait until some channels from the list in pf
.
wait until some channels from the list in pf
.
async{
....
select {
case vx:xChannel.read => doSomethingWithX
case vy:yChannel.write if (vy == valueToWrite) => doSomethingAfterWrite(vy)
case t: Time.after if (t == 1.minute) => processTimeout
}
...
}
Attributes
- Source
- Select.scala
Attributes
- Source
- Select.scala
Attributes
- Source
- Select.scala
create forever runner.
create select groop
create Select Loop.
Attributes
- Source
- Select.scala
Attributes
- Source
- Select.scala
Attributes
- Source
- Select.scala
In this article