Concurrency primitives for creating and managing threads.

IPassableThreadLocal

Available since version 1.0 (view source)

not referred automatically

PROTOCOL with method -pass!

A protocol for thread local objects that support changing their owning thread.

-pass!

Available since version 1.0 (view source)

not referred automatically

Usage:
  • (-pass! this new-thread)

Type signature:
  • (Any ⨯ (Maybe Thread)) → IPassableThreadLocal

Returns a new object similar to this that has changed its thread ownership to the new-thread. Must be called in the thread that owns the this object.

Per convention, this object will not be used again in any way after call to this method, users will use returned one instead.
new-thread may be nil which indicates that object will not be owned and can be accessed from any thread.

IThreadLocal

Available since version 1.0 (view source)

not referred automatically

MARKER PROTOCOL

A marker protocol for thread local objects. A thread local object can be accessed only from its owning thread, which is usually a thread that created the object.