Global state management for loom-otp.
Uses mount.lite for state lifecycle, enabling:
Pids are Thread objects directly. ConcurrentHashMap provides thread-safe access without contention.
Global state management for loom-otp. Uses mount.lite for state lifecycle, enabling: - Clean startup/shutdown - Parallel test sessions with isolated state - Proper cleanup on stop Pids are Thread objects directly. ConcurrentHashMap provides thread-safe access without contention.
(active-pids)Return list of all active process pids. Includes processes that are 'exiting' (exit-reason set but thread still alive). Excludes processes that have fully exited (exit-reason set and thread not alive).
Return list of all active process pids. Includes processes that are 'exiting' (exit-reason set but thread still alive). Excludes processes that have fully exited (exit-reason set and thread not alive).
(cleanup-expired!)Remove processes past their cleanup time. Public API.
Remove processes past their cleanup time. Public API.
(get-proc pid)Get process map for a thread/pid. Returns nil if not found or if process has fully exited. Processes that are 'exiting' (exit-reason set but thread still alive) are returned. Processes that have fully exited (exit-reason set and thread not alive) return nil.
Get process map for a thread/pid. Returns nil if not found or if process has fully exited. Processes that are 'exiting' (exit-reason set but thread still alive) are returned. Processes that have fully exited (exit-reason set and thread not alive) return nil.
(get-proc-raw pid)Get process map for a thread/pid, including processes marked for cleanup. Used internally for cleanup operations.
Get process map for a thread/pid, including processes marked for cleanup. Used internally for cleanup operations.
(mark-for-cleanup! pid)(mark-for-cleanup! pid delay-ms)Mark process for delayed cleanup. Called when a process exits.
Mark process for delayed cleanup. Called when a process exits.
(monitors)Returns the ConcurrentHashMap of ref-id -> monitor-info.
Returns the ConcurrentHashMap of ref-id -> monitor-info.
(process-exists? pid)Check if a process exists in the table and is not past cleanup time.
Check if a process exists in the table and is not past cleanup time.
(processes)Returns the ConcurrentHashMap of Thread -> process-map.
Returns the ConcurrentHashMap of Thread -> process-map.
(put-proc! pid proc)Add process to the process table.
Add process to the process table.
(registry-forward)Returns the ConcurrentHashMap of name -> Thread.
Returns the ConcurrentHashMap of name -> Thread.
(registry-reverse)Returns the ConcurrentHashMap of Thread -> name.
Returns the ConcurrentHashMap of Thread -> name.
(remove-proc! pid)Remove process from the process table.
Remove process from the process table.
(reset-all!)Reset all global state. For testing - stops and restarts the system.
Reset all global state. For testing - stops and restarts the system.
(stop!)Stop the process system, terminating all processes.
Stop the process system, terminating all processes.
The process system state. Contains all processes, monitors, and registry. Pids are Thread objects. Links are stored in each process's :links atom.
The process system state. Contains all processes, monitors, and registry. Pids are Thread objects. Links are stored in each process's :links atom.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |