Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the moira Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 14:26:20 2020 GMT+0.
• Introduction | What moira is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
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: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The moira system |
Paul M. Rodriguez <pmr@ruricolist.com>
MIT
Monitor and restart background threads.
moira.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The moira.asd file | ||
• The moira/package.lisp file | ||
• The moira/types.lisp file | ||
• The moira/thread-ids.lisp file | ||
• The moira/moira.lisp file | ||
• The moira/monitor.lisp file | ||
• The moira/spawn.lisp file |
Next: The moira/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
moira.asd
moira (system)
Next: The moira/types․lisp file, Previous: The moira․asd file, Up: Lisp files [Contents][Index]
Next: The moira/thread-ids․lisp file, Previous: The moira/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
moira (system)
types.lisp
Next: The moira/moira․lisp file, Previous: The moira/types․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
moira (system)
thread-ids.lisp
Next: The moira/monitor․lisp file, Previous: The moira/thread-ids․lisp file, Up: Lisp files [Contents][Index]
moira (system)
moira.lisp
list-monitored-threads (function)
Next: The moira/spawn․lisp file, Previous: The moira/moira․lisp file, Up: Lisp files [Contents][Index]
moira (system)
monitor.lisp
Previous: The moira/monitor․lisp file, Up: Lisp files [Contents][Index]
moira (system)
spawn.lisp
make-thread-and-wait (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The moira package |
package.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [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.
spawn.lisp (file)
Previous: Exported macros, Up: Exported definitions [Contents][Index]
moira.lisp (file)
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.
spawn.lisp (file)
thread-ids.lisp (file)
Run THUNK as a thread, automatically respawning if the thread exits abnormally.
spawn.lisp (file)
monitor.lisp (file)
monitor.lisp (file)
thread-ids.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal symbol macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal classes | ||
• Internal types |
Next: Internal symbol macros, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
monitor.lisp (file)
moira.lisp (file)
thread-ids.lisp (file)
Next: Internal functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
monitor.lisp (file)
moira::*storage-for-deflex-var-monitor-flag*
Next: Internal generic functions, Previous: Internal symbol macros, Up: Internal definitions [Contents][Index]
moira.lisp (file)
thread-ids.lisp (file)
Like ‘make-thread-saving-id’, but wait to return until the thread is actually running.
spawn.lisp (file)
monitor.lisp (file)
types.lisp (file)
Next: Internal classes, Previous: Internal functions, Up: Internal definitions [Contents][Index]
moira.lisp (file)
automatically generated reader method
moira.lisp (file)
automatically generated reader method
moira.lisp (file)
automatically generated reader method
moira.lisp (file)
automatically generated reader method
moira.lisp (file)
moira.lisp (file)
moira.lisp (file)
Next: Internal types, Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
moira.lisp (file)
synchronized (class)
moira::a-thread
monitored-thread.thread (generic function)
boolean
monitored-thread.donep (generic function)
function
:thunk
monitored-thread.thunk (generic function)
string
:name
monitored-thread.name (generic function)
Previous: Internal classes, Up: Internal definitions [Contents][Index]
types.lisp (file)
types.lisp (file)
types.lisp (file)
types.lisp (file)
types.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L M |
---|
Jump to: | F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | C E F G I L M S T |
---|
Jump to: | C E F G I L M S T |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
D M N S T |
---|
Jump to: | *
D M N S T |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A C D L M N P S T |
---|
Jump to: | A C D L M N P S T |
---|