gopher.impl.Writer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-gopher_3.0.0-RC2 Show documentation
Show all versions of scala-gopher_3.0.0-RC2 Show documentation
scala-gopher: asynchronous implementation of CSP ( go-like channels/selectors ) in scala
The newest version!
package gopher.impl
import scala.util.Try
trait Writer[A] extends Expirable[(A,Try[Unit]=>Unit)]
class SimpleWriter[A](a:A, f: Try[Unit]=>Unit) extends Writer[A]:
def canExpire: Boolean = false
def isExpired: Boolean = false
def capture(): Option[(A,Try[Unit]=>Unit)] = Some((a,f))
def markUsed(): Unit = ()
def markFree(): Unit = ()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy