KeepThreadsFactory

tinyscalautils.threads.KeepThreadsFactory
See theKeepThreadsFactory companion object
final class KeepThreadsFactory extends ThreadFactory

A thread factory that keeps a reference on all the threads it creates.

The factory can be reset: threads created before the reset are discarded.

Instances of KeepThreadsFactory are thread-safe, and allThreads can be invoked while the factory is still being used to create more threads.

Attributes

See also
Since

1.0

Companion
object
Source
KeepThreadsFactory.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

All the threads created, in creation order.

All the threads created, in creation order.

The sequence only includes all the threads created since the last reset, if any. The collection is live: newly created threads will be added to it.

Attributes

See also
Since

1.0

Source
KeepThreadsFactory.scala

Attributes

Source
KeepThreadsFactory.scala

Clears the factory.

Clears the factory.

Only the threads created after this reset will be included in the sequence produced by allThreads.

Attributes

See also
Since

1.0

Source
KeepThreadsFactory.scala