gopher

package gopher

package wich introduce go-like language constructions into scala:

goroutines

go scope support:

channels and select statement support:

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. gopher
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type InputChannelPair[A] = (InputChannel[A], A)

  2. type OutputChannelPair[A] = (InputChannel[A], A)

Value Members

  1. object !

    unapply pattern for write case statement in select loop `channel` <~ `x` transformed to write from channel into variable x (and evaluating block if write was successful).

  2. object <~

    unapply pattern for write case statement in select loop `channel` <~ `x` transformed to write from channel into variable x (and evaluating block if write was successful).

  3. object ?

    unapply pattern for read case statement in select loop channel ? x transformed to reading from channel into variable x (end evaluating block in case statement if read was successful)

  4. def bindChannelRead[A](read: InputChannel[A], actor: ActorRef): Unit

    Bind 'read' of channel to actor, i.

    Bind 'read' of channel to actor, i.e. when message sent to channel, it's passed to actor.

    Annotations
    @inline()
  5. def bindChannelWrite[A](write: OutputChannel[A], name: String)(implicit arg0: ClassTag[A], as: ActorSystem): ActorRef

    bind write of channel to actor, i.

    bind write of channel to actor, i.e. create actor, which will put all received messages into channel.

    Annotations
    @inline()
  6. package channels

  7. def defer(x: ⇒ Unit): Unit

    defer statement: push x to be executed at the end of goScope or go block.

    defer statement: push x to be executed at the end of goScope or go block.

    Annotations
    @compileTimeOnly( ... )
  8. def go[A](x: ⇒ A): Future[A]

    spawn execution of x (wrapped into goScope) in separate execution flow.

    spawn execution of x (wrapped into goScope) in separate execution flow.

    Annotations
    @macroImpl( ... )
  9. def goImpl[A](c: Context)(x: scala.reflect.macros.Context.Expr[A]): scala.reflect.macros.Context.Expr[Future[A]]

    implementation of go.

    implementation of go. public as imlementation details.

    See also

    go

  10. def goScope[A](x: ⇒ A): A

    block of code inside goScope is processed for support of 'defer', 'panic' and 'recover' constructions.

    block of code inside goScope is processed for support of 'defer', 'panic' and 'recover' constructions.

    Annotations
    @macroImpl( ... )
  11. def makeChannel[A](capacity: Int = 1000)(implicit arg0: ClassTag[A], ec: ExecutionContext): InputOutputChannel[A]

    Make channel: create go-like channel with given capacity.

    Make channel: create go-like channel with given capacity.

    Annotations
    @inline()
  12. def panic(x: String): Unit

    throw PanicException

    throw PanicException

    Annotations
    @compileTimeOnly( ... )
  13. def recover[A](x: A): Unit

    recover statement: if x (situated inside defer block) will be executed in process of exception handling, inside go scope block, than block will return value of x instead throwing exception.

    recover statement: if x (situated inside defer block) will be executed in process of exception handling, inside go scope block, than block will return value of x instead throwing exception.

    Annotations
    @compileTimeOnly( ... )
  14. package scope

  15. val select: SelectorMacroCaller.type

    select pseudoobject -- used for emulation of go 'select' statements via for-comprehancions.

    select pseudoobject -- used for emulation of go 'select' statements via for-comprehancions. i.e. next go code:

    for(;;) {
    select
      case channelA -> x : do-something-with-x
      case channelB -> y : do-something-with-y
    }

    will looks in scala as

    for(s <- select)
     s match {
       case `channelA` ~> (x: XType) => do-something-with-x
       case `channelB` ~> (y: YType) => do-something-with-y
     }
    
    and plain select (without enclosing loop) as for(s <- select.once) s match { case channelA ~> (x: XType) => do-something-with-x case channelB ~> (y: YType) => do-something-with-y }

    See also

    gopher.~>

    gopher.channels.SelectorContext

  16. def suppressedExceptions: List[Exception]

    Access to list of exceptions from defer blocks, which was suppressed during handling of some other 'first' exception.

    Access to list of exceptions from defer blocks, which was suppressed during handling of some other 'first' exception.

    Annotations
    @compileTimeOnly( ... )
  17. def throwSuppressed: Unit

    throw suppresses exception instead first.

    throw suppresses exception instead first.

    Annotations
    @compileTimeOnly( ... )
  18. object ~>

    unapply pattern for read case statement in select loop channel ~> x transformed to reading from channel into variable x.

Inherited from AnyRef

Inherited from Any

Ungrouped