This is the trivial-main-thread Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:57:21 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
trivial-main-thread
Compatibility library to run things in the main thread.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/trivial-main-thread.git)
zlib
1.0.0
trivial-features
(system).
bordeaux-threads
(system).
simple-tasks
(system).
package.lisp
(file).
main-thread.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
trivial-main-thread/trivial-main-thread.asd
trivial-main-thread/package.lisp
trivial-main-thread/main-thread.lisp
trivial-main-thread/documentation.lisp
trivial-main-thread/trivial-main-thread.asd
trivial-main-thread
(system).
trivial-main-thread/package.lisp
trivial-main-thread
(system).
trivial-main-thread/main-thread.lisp
package.lisp
(file).
trivial-main-thread
(system).
*main-thread*
(special variable).
*runner*
(special variable).
call-in-main-thread
(function).
ensure-main-runner
(function).
ensure-main-runner-started
(function).
find-main-thread
(function).
schedule-task
(function).
start-main-runner
(function).
stop-main-runner
(function).
swap-main-thread
(function).
with-body-in-main-thread
(macro).
%ensure-mt
(macro).
runner-starter
(function).
trivial-main-thread/documentation.lisp
main-thread.lisp
(file).
trivial-main-thread
(system).
setdocs
(macro).
Packages are listed by definition order.
trivial-main-thread
org.shirakumo.trivial-main-thread
tmt
common-lisp
.
*main-thread*
(special variable).
*runner*
(special variable).
call-in-main-thread
(function).
ensure-main-runner
(function).
ensure-main-runner-started
(function).
find-main-thread
(function).
schedule-task
(function).
start-main-runner
(function).
stop-main-runner
(function).
swap-main-thread
(function).
with-body-in-main-thread
(macro).
%ensure-mt
(macro).
runner-starter
(function).
setdocs
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Holds the main thread.
Holds the runner object to be set into the main thread.
See SIMPLE-TASKS:RUNNER
Evaluate the BODY in the main thread. This always calls ENSURE-MAIN-RUNNER-STARTED.
See CALL-IN-MAIN-THREAD
Call FUNCTION in the main thread.
This always calls ENSURE-MAIN-RUNNER-STARTED.
If BLOCKING is non-NIL, the current thread is blocked until the function has
finished running. The function’s return values are returned. Otherwise, the
task created to call the function is returned.
See SIMPLE-TASKS:CALL-AS-TASK
Ensure that the main thread runner is indeed running.
If the MAIN-THREAD is EQL to BT:CURRENT-THREAD, then the RUNNER is CHANGE-CLASSed into SIMPLE-TASK:RUNNER. This runner class does not use threading and instead directly executes the tasks. If we did not do this, situations where the main thread is the currently evaluating thread, we would block it forever, and thus stop it from ever reaching any task scheduling calls.
Ensure that the main thread runner is indeed started.
This calls ENSURE-MAIN-RUNNER and then sleeps until the runner reports itself
as running.
Attempts to find the main thread (thread 0) of the implementation.
If no implementation specific handling is implemented, the last thread in the list of threads reported by BT:ALL-THREADS is primitively chosen.
Schedule TASK to be run on the main thread runner.
This always calls ENSURE-MAIN-RUNNER-STARTED.
See SIMPLE-TASKS:SCHEDULE-TASK
Starts the runner in the main thread.
If a runner or main-thread is passed explicitly, *RUNNER* and *MAIN-THREAD*
are set to those values respectively.
See SIMPLE-TASKS:START-RUNNER
See SWAP-MAIN-THREAD
Stops the runner in the main thread, allowing it to continue.
This will destroy any sidestepping thread that might have been created by SWAP-THREAD.
Swaps the main thread for our own FUNCTION.
If the implementation uses the main thread for vital tasks, this function tries to ensure that these vital tasks are continued in a new thread instead.
If the MAIN-THREAD is EQL to BT:CURRENT-THREAD, then the FUNCTION is simply called.
Jump to: | %
C E F M R S W |
---|
Jump to: | %
C E F M R S W |
---|
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | D F M P S T |
---|
Jump to: | D F M P S T |
---|