class Queue[A] extends AnyRef
* A Queue is a lightweight, asynchronous queue. This implementation is
* naive, if functional, and could benefit from significant optimization.
*
* TODO:
*
* 1. Investigate using a faster option than Queue, because Queue has
* O(n) length method.
* 2. Benchmark to see how slow this implementation is and if there are any
* easy ways to improve performance.
- Alphabetic
- By Inheritance
- Queue
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
interruptOffer(t: Throwable): IO[Nothing, Boolean]
Interrupts any fibers that are suspended on
offerbecause the queue is * at capacity.Interrupts any fibers that are suspended on
offerbecause the queue is * at capacity. If any fibers are interrupted, returns true, otherwise, * returns false. -
final
def
interruptTake(t: Throwable): IO[Nothing, Boolean]
Interrupts any fibers that are suspended on
takebecause the queue is * empty.Interrupts any fibers that are suspended on
takebecause the queue is * empty. If any fibers are interrupted, returns true, otherwise, returns * false. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
offer(a: A): IO[Nothing, Unit]
Places the value in the queue.
Places the value in the queue. If the queue has reached capacity, then * the fiber performing the
offerwill be suspended until there is room in * the queue. -
final
def
size: IO[Nothing, Int]
Retrieves the size of the queue, which is equal to the number of elements in the queue.
Retrieves the size of the queue, which is equal to the number of elements in the queue. This may be negative if fibers are suspended waiting for elements to be added to the queue.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
take: IO[Nothing, A]
Removes the oldest value in the queue.
Removes the oldest value in the queue. If the queue is empty, this will * return a computation that resumes when an item has been added to the queue.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )