Gopher

trait Gopher[F[_]]

core of Gopher API. Given instance of Gopher[F] need for using most of Gopher operations.

Gopher is a framework, which implements CSP (Communication Sequence Process). Process here - scala units of execution (i.e. functions, blok of code, etc). Communication channels represented by [gopher.Channel]

See also

[gopher.Channel]

[gopher#select]

Source
Gopher.scala
class Object
trait Matchable
class Any
class JVMGopher[F]

Type members

Types

type Monad[X] = F[X]

Value members

Abstract methods

def log(level: Level, message: String, ex: Throwable | Null): Unit
def makeChannel[A](bufSize: Int, autoClose: Boolean): Channel[F, A, A]

Create Read/Write channel.

Create Read/Write channel.

Value Params
autoClose
  • close after first message was written to channel.
bufSize
  • size of buffer. If it is zero, the channel is unbuffered. (i.e. writer is blocked until reader start processing).
See also

[gopher.Channel]

Source
Gopher.scala
def setLogFun(logFun: (Level, String, Throwable | Null) => Unit): (Level, String, Throwable | Null) => Unit

set logging function, which output internal diagnostics and errors from spawned processes.

set logging function, which output internal diagnostics and errors from spawned processes.

Source
Gopher.scala
def taskExecutionContext: ExecutionContext
def time: Time[F]

get an object with time operations.

get an object with time operations.

Source
Gopher.scala

Concrete methods

def asyncMonad: CpsSchedulingMonad[F]

Monad which control asynchronic execution. The main is scheduling: i.e. ability to submit monadic expression to scheduler and know that this monadic expression will be evaluated.

Monad which control asynchronic execution. The main is scheduling: i.e. ability to submit monadic expression to scheduler and know that this monadic expression will be evaluated.

Source
Gopher.scala
def log(level: Level, message: String): Unit
def makeOnceChannel[A](): Channel[F, A, A]

Create channel where you can write only one element.

Create channel where you can write only one element.

See also

[gopher.Channel]

Source
Gopher.scala
def select: Select[F]

Create a select statement, which used for choosing one action from a set of potentially concurrent asynchronics events. [@see gopher.Select]

Create a select statement, which used for choosing one action from a set of potentially concurrent asynchronics events. [@see gopher.Select]

Source
Gopher.scala