ReadWriteMutex

japgolly.scalajs.react.callback.AsyncCallback$.ReadWriteMutex
final class ReadWriteMutex

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def read[A](ac: AsyncCallback[A]): AsyncCallback[A]

Wrap a AsyncCallback so that it executes in the read-mutex. There can be many readers active at one time.

Wrap a AsyncCallback so that it executes in the read-mutex. There can be many readers active at one time.

Note: Calling this from within the write-mutex will block.

Attributes

def write[A](ac: AsyncCallback[A]): AsyncCallback[A]

Wrap a AsyncCallback so that it executes in the write-mutex. There can only be one writer active at one time.

Wrap a AsyncCallback so that it executes in the write-mutex. There can only be one writer active at one time.

Note: THIS IS NOT RE-ENTRANT. Calling this from within the read or write mutex will block.

Attributes