Liking cljdoc? Tell your friends :D

loom-otp.process.core

Minimal core process primitives: current process, messaging, exit signal handling.

This namespace provides the foundation that other process.* namespaces build on. Pids are Thread objects.

Process identity is determined by Thread -> process-map lookup in ConcurrentHashMap. One process = one thread = one mailbox. No cross-thread context sharing.

Minimal core process primitives: current process, messaging, exit signal handling.

This namespace provides the foundation that other process.* namespaces build on.
Pids are Thread objects.

Process identity is determined by Thread -> process-map lookup in ConcurrentHashMap.
One process = one thread = one mailbox. No cross-thread context sharing.
raw docstring

get-procclj

(get-proc pid)

Get process by pid (Thread). Returns nil if not found.

Get process by pid (Thread). Returns nil if not found.
sourceraw docstring

get-user-resultclj

(get-user-result pid)

Get the user-result promise from a process by pid. Returns nil if process doesn't exist or has no user-result.

Get the user-result promise from a process by pid.
Returns nil if process doesn't exist or has no user-result.
sourceraw docstring

message-contextclj

(message-context)

Get the current process's message context. Returns {} if called outside a process.

Get the current process's message context.
Returns {} if called outside a process.
sourceraw docstring

process-exists?clj

(process-exists? pid)

Check if process exists in the process table.

Check if process exists in the process table.
sourceraw docstring

selfclj

(self)

Return the pid (Thread) of the current process. Must be called from within a process.

Return the pid (Thread) of the current process. Must be called from within a process.
sourceraw docstring

self-procclj

(self-proc)

Return the current process map. Internal use.

Return the current process map. Internal use.
sourceraw docstring

sendclj

(send dest message)

Send message to destination (pid/Thread or registered name). Returns true if delivered. Message is wrapped with sender's context for propagation.

Send message to destination (pid/Thread or registered name). Returns true if delivered.
Message is wrapped with sender's context for propagation.
sourceraw docstring

send-exit-signal!clj

(send-exit-signal! to-pid from-pid reason ctx)

Send exit signal to a process. Handles trap-exit semantics.

  • If trap-exit=true: converts to [:EXIT from reason] message
  • If reason=:kill: interrupts thread with :killed
  • If reason=:normal (or [:normal x]) and not trapping: ignored
  • Otherwise: sets exit reason and interrupts thread

ctx is the context from the signaling/dying process. Returns true if signal was sent, false if target doesn't exist.

Send exit signal to a process. Handles trap-exit semantics.
- If trap-exit=true: converts to [:EXIT from reason] message
- If reason=:kill: interrupts thread with :killed
- If reason=:normal (or [:normal x]) and not trapping: ignored
- Otherwise: sets exit reason and interrupts thread

ctx is the context from the signaling/dying process.
Returns true if signal was sent, false if target doesn't exist.
sourceraw docstring

try-selfclj

(try-self)

Return the pid (Thread) of the current process, or nil if not in a process context.

Return the pid (Thread) of the current process, or nil if not in a process context.
sourceraw docstring

update-message-context!clj

(update-message-context! ctx)

Merge ctx into current process's message context. No-op if called outside a process or ctx is nil/empty.

Merge ctx into current process's message context.
No-op if called outside a process or ctx is nil/empty.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close