attached to every Promise in the produced Spool.
Gets the current outstanding Future for the next Spool value.
Gets the current outstanding Future for the next Spool value. The returned Spool will see all future values passed to offer(), up until close() is called. Previous values passed to offer() will not be seen in the Spool.
Closes this SpoolSource, which also terminates the generated Spool.
Closes this SpoolSource, which also terminates the generated Spool. This method is idempotent.
Fulfilled when this SpoolSource has been closed or an exception is raised.
Puts a value into the spool.
Puts a value into the spool. Unless this SpoolSource has been closed, the current
Future[Spool[A]] value will be fulfilled with a Spool that contains the
provided value. If the SpoolSource has been closed, then this value is ignored.
If multiple threads call offer
simultaneously, the operation is thread-safe but
the resulting order of values in the spool is non-deterministic.
Puts a value into the spool and closes this SpoolSource.
Puts a value into the spool and closes this SpoolSource. Unless
this SpoolSource has been closed, the current Future[Spool[A]]
value will be fulfilled with value *:: Future.value(Spool.empty[A])
.
If the SpoolSource has been closed, then this value is ignored.
If multiple threads call offer simultaneously, the operation is
thread-safe but the resulting order of values in the spool is
non-deterministic.
Raises exception on this SpoolSource, which also terminates the generated Spool.
Raises exception on this SpoolSource, which also terminates the generated Spool. This method is idempotent.
A SpoolSource is a simple object for creating and populating a Spool-chain. apply() returns a Future[Spool] that is populated by calls to offer(). This class is thread-safe.