TQueue

final class TQueue[A]
Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

Checks if the queue is empty.

Checks if the queue is empty.

Checks if the queue is at capacity.

Checks if the queue is at capacity.

def last: USTM[A]

Views the last element inserted into the queue, retrying if the queue is empty.

Views the last element inserted into the queue, retrying if the queue is empty.

def offer(a: A): USTM[Unit]

Offers the specified value to the queue, retrying if the queue is at capacity.

Offers the specified value to the queue, retrying if the queue is at capacity.

def offerAll(as: Iterable[A]): USTM[Iterable[A]]

Offers each of the elements in the specified collection to the queue up to the maximum capacity of the queue, retrying if there is not capacity in the queue for all of these elements. Returns any remaining elements in the specified collection.

Offers each of the elements in the specified collection to the queue up to the maximum capacity of the queue, retrying if there is not capacity in the queue for all of these elements. Returns any remaining elements in the specified collection.

def peek: USTM[A]

Views the next element in the queue without removing it, retrying if the queue is empty.

Views the next element in the queue without removing it, retrying if the queue is empty.

Views the next element in the queue without removing it, returning None if the queue is empty.

Views the next element in the queue without removing it, returning None if the queue is empty.

def poll: USTM[Option[A]]

Takes a single element from the queue, returning None if the queue is empty.

Takes a single element from the queue, returning None if the queue is empty.

def seek(f: A => Boolean): USTM[A]

Drops elements from the queue while they do not satisfy the predicate, taking and returning the first element that does satisfy the predicate. Retries if no elements satisfy the predicate.

Drops elements from the queue while they do not satisfy the predicate, taking and returning the first element that does satisfy the predicate. Retries if no elements satisfy the predicate.

def size: USTM[Int]

Returns the number of elements currently in the queue.

Returns the number of elements currently in the queue.

def take: USTM[A]

Takes a single element from the queue, retrying if the queue is empty.

Takes a single element from the queue, retrying if the queue is empty.

def takeAll: USTM[List[A]]

Takes all elements from the queue.

Takes all elements from the queue.

def takeUpTo(max: Int): USTM[List[A]]

Takes up to the specified maximum number of elements from the queue.

Takes up to the specified maximum number of elements from the queue.

Concrete fields