Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the moira Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:22:05 2022 GMT+0.
Next: Systems, Previous: The moira Reference Manual, Up: The moira Reference Manual [Contents][Index]
Moira is a simple (but not quite trivial) library for monitoring and, if necessary, restarting long-running threads. In principle, it is like an in-Lisp process supervisor.
To start the monitor, you call start-monitor
:
(moira:start-monitor)
Once the monitor is started, you can spawn new threads:
(moira:spawn "Background worker"
...))
Which is syntactic sugar for
(moira:spawn-thread
(lambda () ...)
:name "Background worker")
If the thread created by spawn-thread
should crash, or otherwise
exit abnormally, Moira will step in and restart the thread.
You can stop monitoring with stop-monitor
(moira:stop-monitor)
Although this will not affect the spawned threads.
On Linux only, Moira also tracks the thread ID (value of gettid
) of
the Lisp threads it launches. This can be useful for tracking the
resource usage of individual thr
Next: Files, Previous: Introduction, Up: The moira Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Monitor and restart background threads.
Paul M. Rodriguez <pmr@ruricolist.com>
MIT
Next: Packages, Previous: Systems, Up: The moira Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: moira/types.lisp, Previous: moira/moira.asd, Up: Lisp [Contents][Index]
Next: moira/thread-ids.lisp, Previous: moira/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
moira (system).
Next: moira/moira.lisp, Previous: moira/types.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
moira (system).
Next: moira/monitor.lisp, Previous: moira/thread-ids.lisp, Up: Lisp [Contents][Index]
moira (system).
Next: moira/spawn.lisp, Previous: moira/moira.lisp, Up: Lisp [Contents][Index]
moira (system).
Previous: moira/monitor.lisp, Up: Lisp [Contents][Index]
moira (system).
make-thread-and-wait (function).
Next: Definitions, Previous: Files, Up: The moira Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The moira Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Like (spawn-thread (lambda () ...)).
If the first form in BODY is a string, that string is used as the name
of the thread.
Next: Standalone methods, Previous: Macros, Up: Public Interface [Contents][Index]
Like ‘bt:make-thread’, but save the id of the resulting thread so
it can be retrieved later with ‘moira:thread-id’.
Using ‘moira:make-thread-saving-id’ lets you start a thread that is not monitored, but does have its ID tracked.
Run THUNK as a thread, automatically respawning if the thread exits abnormally.
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Symbol macros, Previous: Internals, Up: Internals [Contents][Index]
Next: Ordinary functions, Previous: Special variables, Up: Internals [Contents][Index]
Next: Generic functions, Previous: Symbol macros, Up: Internals [Contents][Index]
Like ‘make-thread-saving-id’, but wait to return until the thread is actually running.
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
automatically generated reader method
done.
automatically generated reader method
name.
automatically generated reader method
automatically generated reader method
Next: Types, Previous: Generic functions, Up: Internals [Contents][Index]
synchronized.
moira::a-thread
This slot is read-only.
boolean
This slot is read-only.
function
:thunk
This slot is read-only.
string
:name
This slot is read-only.
Previous: Definitions, Up: The moira Reference Manual [Contents][Index]
Jump to: | C E F G I L M P S T |
---|
Jump to: | C E F G I L M P S T |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
D M N S T |
---|
Jump to: | *
D M N S T |
---|
Jump to: | A C D F L M N P S T |
---|
Jump to: | A C D F L M N P S T |
---|