The simple-tasks Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The simple-tasks Reference Manual

This is the simple-tasks Reference Manual, version 1.3.0, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:21:07 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

About simple-tasks

Recently I noticed that I seem to write a similar pattern way too often: Some form of scheduling or task management part. Usually this is due to the need of executing some task in a specific thread, or simply wanting to schedule something for processing in the background.

Basic Usage

Load it through ASDF or Quicklisp:

(ql:quickload :simple-tasks)

Before we can do anything, we need to have a manager to run tasks with. These are called runners. Usually you will want a queued-runner which will use threading capabilities if the system provides them, and thus can process tasks in the background.

(defvar *runner* (make-instance 'simple-tasks:queued-runner))

Next we'll want to start the runner, if possible in a separate thread. The standard start-runner function does not do this, as you might want to set up the thread scenario yourself, or perhaps even inject the runner into a different thread. However, for the common scenario, there's make-runner-thread.

(defvar *thread* (simple-tasks:make-runner-thread *runner*))

Now we can finally create tasks and send them off for processing! Out of the box, simple-tasks provides three classes to do remote evaluation with: call-task, blocking-call-task, and callback-task. However, adding your own is very easy. Just subclass task and implement run-task.

(defvar *task* (make-instance 'simple-tasks:call-task :func (lambda () (print "hi"))))

Finally we need to send off the task for processing.

(simple-tasks:schedule-task *task* *runner*)

All call-tasks also save the return-values of the function they're calling, so you can read that out later. Usually if you want to do so, you'll want to either block until the task is done, or delegate to a callback function. The former is made convenient through with-body-as-task.

(simple-tasks:with-body-as-task (*runner*)
  (sleep 1)
  (expt 2 12))

In the case that a task encounters a failure during a run, it sets its status to :errored and saves the current environment. You can inspect this environment at any later point by fetching it with error-environment and looking at its contents with the various functions Dissect provides. This is mostly useful in a scenario where you cannot use a debugger and thus just automatically invoke the skip restart in the runner thread. With the environment saved, the error can still be inspected elsewhere or at a later date.

(dissect:present
  (simple-tasks:error-environment
    (simple-tasks:schedule-task 
      (make-instance 'simple-tasks:blocking-call-task :func (lambda () (error "Hi"))) *runner*)))

And that's pretty much it.

(simple-tasks:stop-runner *runner*)

Extending simple-tasks

If you want to add flexibility by creating your own specialised task classes, you should look at task, run-task, and schedule-task. Usually you can get away by just subclassing task, and adding a run-task method to do your calculations in. If you also need to modify the behaviour of the scheduling, adding :after methods to schedule-task can also be useful.

In case that the existing runners aren't suited to your needs, adding one should also not be much of a problem. Simply subclass runner, and implement appropriate methods for start-runner, stop-runner, and schedule-task. The existing methods on runner will take care of keeping the status in sync and making sure no invalid calls can be made.

Also See


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 simple-tasks

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/simple-tasks

License

Artistic

Description

A very simple task scheduling framework.

Version

1.3.0

Dependencies
Source

simple-tasks.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 simple-tasks.asd

Location

simple-tasks.asd

Systems

simple-tasks (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 simple-tasks/package.lisp

Parent

simple-tasks (system)

Location

package.lisp

Packages

simple-tasks


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 simple-tasks/toolkit.lisp

Dependency

package.lisp (file)

Parent

simple-tasks (system)

Location

toolkit.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 simple-tasks/status.lisp

Dependency

toolkit.lisp (file)

Parent

simple-tasks (system)

Location

status.lisp

Exported Definitions
Internal Definitions

status-list-p (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 simple-tasks/runner.lisp

Dependency

status.lisp (file)

Parent

simple-tasks (system)

Location

runner.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 simple-tasks/task.lisp

Dependency

runner.lisp (file)

Parent

simple-tasks (system)

Location

task.lisp

Exported Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.7 simple-tasks/documentation.lisp

Dependency

task.lisp (file)

Parent

simple-tasks (system)

Location

documentation.lisp

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 simple-tasks

Source

package.lisp (file)

Nickname

org.shirakumo.simple-tasks

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *runner*

Bound to the current runner if within a runner context. Otherwise, set to NIL. Useful to detect if a task is run in a particular runner to avoid conflicts.

Package

simple-tasks

Source

runner.lisp (file)

Special Variable: +no-threading-stump+

Constant to hold an instance of NO-THREADING-STUMP.

Package

simple-tasks

Source

toolkit.lisp (file)

Special Variable: +status-ended+

Constant matching any ended (not necessarily successful) status.

:STOPPING Object is in the process of being stopped. :STOPPED Object has been stopped.
:COMPLETED Object successfully completed execution. :ERRORED Object ended execution with an error.

Package

simple-tasks

Source

status.lisp (file)

Special Variable: +status-running+

Constant matching a running status.

:RUNNING Object is currently executing.

Package

simple-tasks

Source

status.lisp (file)

Special Variable: +status-started+

Constant matching any started (not necessarily running) status.

:CREATED Object has been initialized, but not started. :SCHEDULED Object has been scheduled for execution. :RUNNING Object is currently executing.

Package

simple-tasks

Source

status.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: with-body-as-task (RUNNER &optional TASK-CLASS) &body BODY

Evaluate BODY within a task, usually a BLOCKING-CALL-TASK.

See CALL-AS-TASK

Package

simple-tasks

Source

task.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: call-as-task FUNCTION RUNNER &optional TASK-CLASS

Call function within a task, usually a BLOCKING-CALL-TASK.
Depending on the task’s STATUS after SCHEDULE-TASK returns, the following happens. :COMPLETED The task’s return values are returned.
:ERRORED A condition of type TASK-ERRORED is signalled.
T The task is returned.

See SCHEDULE-TASK
See BLOCKING-CALL-TASK

Package

simple-tasks

Source

task.lisp (file)

Function: make-runner-thread RUNNER

Make a thread to call START-RUNNER on RUNNER in.

On platforms with thread support, this returns the new thread.
On platforms without, this simply calls START-RUNNER and returns NIL.

See START-RUNNER

Package

simple-tasks

Source

runner.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Generic functions

Generic Function: await TASK STATUS

Wait for the TASK to match a certain STATUS.

On systems without thread support this does nothing.

See STATUS=

Package

simple-tasks

Source

task.lisp (file)

Methods
Method: await (TASK notifying-task) STATUS
Method: await (TASK task) STATUS
Generic Function: back-queue RUNNER

The current back-queue of the runner.

Used to swap with QUEUE when events are handled.

See QUEUE

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: back-queue (QUEUED-RUNNER queued-runner)

automatically generated reader method

Generic Function: callback CALLBACK-TASK

The function to call upon completion of the task.

See CALLBACK-TASK

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf callback) (generic function)

Methods
Method: callback (CALLBACK-TASK callback-task)

automatically generated reader method

Generic Function: (setf callback) NEW-VALUE OBJECT
Package

simple-tasks

Reader

callback (generic function)

Methods
Method: (setf callback) NEW-VALUE (CALLBACK-TASK callback-task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: cvar OBJECT

The condition variable used to exchange signals.

See QUEUED-RUNNER
See BLOCKING-CALL-TASK

Package

simple-tasks

Source

runner.lisp (file)

Writer

(setf cvar) (generic function)

Methods
Method: cvar (NOTIFYING-TASK notifying-task)

automatically generated reader method

Source

task.lisp (file)

Method: cvar (QUEUED-RUNNER queued-runner)

automatically generated reader method

Generic Function: (setf cvar) NEW-VALUE OBJECT
Package

simple-tasks

Reader

cvar (generic function)

Methods
Method: (setf cvar) NEW-VALUE (NOTIFYING-TASK notifying-task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: error-environment TASK

An environment object that is stored in case the task fails to run properly.

See DISSECT:ENVIRONMENT

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf error-environment) (generic function)

Methods
Method: error-environment (TASK task)

automatically generated reader method

Generic Function: (setf error-environment) NEW-VALUE OBJECT
Package

simple-tasks

Reader

error-environment (generic function)

Methods
Method: (setf error-environment) NEW-VALUE (TASK task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: func CALL-TASK

The function the call-task calls once it is run.

See CALL-TASK

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf func) (generic function)

Methods
Method: func (CALL-TASK call-task)

automatically generated reader method

Generic Function: (setf func) NEW-VALUE OBJECT
Package

simple-tasks

Reader

func (generic function)

Methods
Method: (setf func) NEW-VALUE (CALL-TASK call-task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: interrupt-task TASK RUNNER

Interrupt the TASK to stop it from execution on RUNNER.

If the task is currently on the RUNNER’s queue to be executed (:SCHEDULED), it is removed from the queue. If the task is currently running, it is forcibly aborted. In either case, the task’s status is changed to :STOPPED and it will not execute further. On systems without thread support this does nothing.

If this is called with the RUNNER being T, the current runner of the TASK is used, if possible. If this is called with the RUNNER being NIL, the actual termination mechanism for the task is performed, leading it to be terminated.

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: interrupt-task (TASK task) (TRUE (eql t))
Source

task.lisp (file)

Method: interrupt-task (TASK task) (NULL null)
Source

task.lisp (file)

Method: interrupt-task TASK (RUNNER queued-runner)
Method: interrupt-task TASK (RUNNER runner)
Generic Function: lock OBJECT

The lock used to coordinate task scheduling with the runner.

See QUEUED-RUNNER

Package

simple-tasks

Source

runner.lisp (file)

Writer

(setf lock) (generic function)

Methods
Method: lock (NOTIFYING-TASK notifying-task)

automatically generated reader method

Source

task.lisp (file)

Method: lock (QUEUED-RUNNER queued-runner)

automatically generated reader method

Generic Function: (setf lock) NEW-VALUE OBJECT
Package

simple-tasks

Reader

lock (generic function)

Methods
Method: (setf lock) NEW-VALUE (NOTIFYING-TASK notifying-task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: queue RUNNER

The current task queue of the runner.

Do not directly push tasks to this! Use SCHEDULE-TASK instead.
This queue is also NOT indicative of which tasks have yet to be run, or which ones have. When the queued runner runs, it retains the current queue for processing and sets a new, empty queue on the runner. As such, when you look at the queue at any particular moment, tasks that are not in it might not have run yet.

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: queue (QUEUED-RUNNER queued-runner)

automatically generated reader method

Generic Function: return-values CALL-TASK

Returns the values that the call returned.

See CALL-TASK

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf return-values) (generic function)

Methods
Method: return-values (TASK call-task) around
Method: return-values (CALL-TASK call-task)

automatically generated reader method

Generic Function: (setf return-values) NEW-VALUE OBJECT
Package

simple-tasks

Reader

return-values (generic function)

Methods
Method: (setf return-values) NEW-VALUE (CALL-TASK call-task)

automatically generated writer method

Source

task.lisp (file)

Generic Function: run-task TASK

Run the given task object directly.

One restart is established:
STOP to forcibly stop (interrupt) the task. Assigns the :STOPPED status.

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: run-task (TASK callback-task) after
Source

task.lisp (file)

Method: run-task (TASK notifying-task) around
Source

task.lisp (file)

Method: run-task (TASK call-task)
Source

task.lisp (file)

Method: run-task (TASK task) around
Source

task.lisp (file)

Generic Function: runner TASK

The runner the task is scheduled on.

See TASK

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf runner) (generic function)

Methods
Method: runner (TASK task)

automatically generated reader method

Method: runner (CONDITION runner-condition)
Source

runner.lisp (file)

Generic Function: (setf runner) NEW-VALUE CONDITION
Package

simple-tasks

Reader

runner (generic function)

Methods
Method: (setf runner) NEW-VALUE (TASK task)

automatically generated writer method

Source

task.lisp (file)

Method: (setf runner) NEW-VALUE (CONDITION runner-condition)
Source

runner.lisp (file)

Generic Function: schedule-task TASK RUNNER

Schedule the task object for running.
The task may or may not be run immediately, depending on the runner and given system support. Tasks are guaranteed to be run in the same order as they are scheduled.

See RUN-TASK

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: schedule-task (TASK blocking-task) RUNNER after
Source

task.lisp (file)

Method: schedule-task (TASK blocking-task) RUNNER
Source

task.lisp (file)

Method: schedule-task (TASK blocking-task) RUNNER around
Source

task.lisp (file)

Method: schedule-task (TASK task) RUNNER before
Source

task.lisp (file)

Method: schedule-task TASK (RUNNER queued-runner)
Method: schedule-task TASK (RUNNER runner)
Method: schedule-task TASK (RUNNER runner) before
Generic Function: start-runner RUNNER

Start the the runner.

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: start-runner (RUNNER queued-runner)
Method: start-runner (RUNNER runner)
Method: start-runner (RUNNER runner) around
Method: start-runner (RUNNER runner) before
Generic Function: status STATUS-OBJECT

Current status indicator of the status-object.

Package

simple-tasks

Source

status.lisp (file)

Writer

(setf status) (generic function)

Methods
Method: status (STATUS-OBJECT status-object)

automatically generated reader method

Generic Function: (setf status) NEW-VALUE OBJECT
Package

simple-tasks

Reader

status (generic function)

Methods
Method: (setf status) NEW-VALUE (STATUS-OBJECT status-object)

automatically generated writer method

Source

status.lisp (file)

Generic Function: status= A B

Compare two statuses with each other (commutative).

Package

simple-tasks

Source

status.lisp (file)

Methods
Method: status= (A list) (B list)
Method: status= B (A status-object)
Method: status= (B list) (A status-object)
Method: status= (A status-object) B
Method: status= (A status-object) (B list)
Method: status= (A status-object) (B status-object)
Generic Function: stop-runner RUNNER

Stop the the runner.

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: stop-runner (RUNNER queued-runner)
Method: stop-runner (RUNNER runner)
Method: stop-runner (RUNNER runner) before
Generic Function: task TASK-CONDITION

The task related to the condition.

Package

simple-tasks

Source

task.lisp (file)

Writer

(setf task) (generic function)

Methods
Method: task (CONDITION task-condition)
Generic Function: (setf task) NEW-VALUE CONDITION
Package

simple-tasks

Reader

task (generic function)

Methods
Method: (setf task) NEW-VALUE (CONDITION task-condition)
Source

task.lisp (file)

Generic Function: task-ready-p TASK

Returns T if the task is ready to be run.

Package

simple-tasks

Source

task.lisp (file)

Methods
Method: task-ready-p (TASK task)
Generic Function: thread OBJECT

Returns the current thread associated with the queued-runner if any.

See QUEUED-RUNNER

Package

simple-tasks

Source

runner.lisp (file)

Methods
Method: thread (QUEUED-RUNNER queued-runner)

automatically generated reader method


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Conditions

Condition: runner-condition ()

Condition superclass for conditions related to runner operations.

Package

simple-tasks

Source

runner.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Direct methods
Direct slots
Slot: runner
Initargs

:runner

Readers

runner (generic function)

Writers

(setf runner) (generic function)

Direct Default Initargs
InitargValue
:runner(error "runner required.")
Condition: runner-not-started ()

Condition signalled when the runner is not yet started, but has to be.

Package

simple-tasks

Source

runner.lisp (file)

Direct superclasses
Condition: runner-not-stopped ()

Condition signalled when the runner did not stop properly.

Package

simple-tasks

Source

runner.lisp (file)

Direct superclasses
Condition: task-already-scheduled ()

Condition signalled when attempting to reschedule an already scheduled task.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses
Condition: task-condition ()

Condition superclass for task operation related conditions.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

condition (condition)

Direct subclasses
Direct methods
Direct slots
Slot: task
Initargs

:task

Readers

task (generic function)

Writers

(setf task) (generic function)

Direct Default Initargs
InitargValue
:task(error "task required.")
Condition: task-errored ()

Condition signalled when a task failed to run properly.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.6 Classes

Class: blocking-call-task ()

Task class to perform a function call once run. Blocks the scheduling thread until it is done.

See CALL-TASK
See BLOCKING-TASK

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses
Class: blocking-task ()

A task that will block after being scheduled until it is done or interrupted.

When SCHEDULE-TASK is called on this, it establishes two restarts:
ABORT to forcibly abort (interrupt) the task.
UNBLOCK to resume execution in the current thread and leave the task running.

If a restart or similar exit functionality is invoked that leaves the scope of SCHEDULE-TASK, the task is interrupted.

Note that the restarts are not useful on systems without thread support. In such a case the task will be interrupted either way, due to the very nature of running in the current thread.

See AWAIT
See INTERRUPT-TASK
See NOTIFYING-TASK

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

notifying-task (class)

Direct subclasses

blocking-call-task (class)

Direct methods
Class: call-task ()

Task class to perform a function call once run. Stores the return values.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

task (class)

Direct subclasses
Direct methods
Direct slots
Slot: func
Initargs

:func

Readers

func (generic function)

Writers

(setf func) (generic function)

Slot: return-values
Readers

return-values (generic function)

Writers

(setf return-values) (generic function)

Direct Default Initargs
InitargValue
:func(error "func required.")
Class: callback-task ()

Task class to perform a function call once run and call a callback upon completion.

If the task completes successfully, the callback function is called with each return value as an argument. Note that the callback function is called within the runner environment which may be different from the scheduler environment.

See CALL-TASK

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

call-task (class)

Direct methods
Direct slots
Slot: callback
Initargs

:callback

Readers

callback (generic function)

Writers

(setf callback) (generic function)

Direct Default Initargs
InitargValue
:callback(error "callback required.")
Class: no-threading-stump ()

Stump class to stand in place of a value on systems without threading support.

Package

simple-tasks

Source

toolkit.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

print-object (method)

Class: notifying-task ()

A task that will notify a condition upon completion.

This is particularly useful in conjunction with AWAIT.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

task (class)

Direct subclasses

blocking-task (class)

Direct methods
Direct slots
Slot: lock
Initargs

:lock

Readers

lock (generic function)

Writers

(setf lock) (generic function)

Slot: cvar
Initargs

:cvar

Readers

cvar (generic function)

Writers

(setf cvar) (generic function)

Direct Default Initargs
InitargValue
:lock(bordeaux-threads:make-lock "notifying-task")
:cvar(bordeaux-threads:make-condition-variable :name "notifying-task")
Class: queued-runner ()

Queued runner. Runs tasks in a thread if threading is available. Noe that START-RUNNER for this runner will block the current thread.

Package

simple-tasks

Source

runner.lisp (file)

Direct superclasses

runner (class)

Direct methods
Direct slots
Slot: queue
Initargs

:queue

Readers

queue (generic function)

Writers

%set-queue (generic function)

Slot: back-queue
Initargs

:back-queue

Readers

back-queue (generic function)

Writers

%set-back-queue (generic function)

Slot: lock
Initargs

:lock

Readers

lock (generic function)

Slot: cvar
Initargs

:cvar

Readers

cvar (generic function)

Slot: thread
Initargs

:thread

Readers

thread (generic function)

Writers

%set-thread (generic function)

Direct Default Initargs
InitargValue
:queue(make-array 100 :adjustable t :fill-pointer 0)
:back-queue(make-array 100 :adjustable t :fill-pointer 0)
:lock(bordeaux-threads:make-lock "task-runner-queue-lock")
:cvar(bordeaux-threads:make-condition-variable :name "task-runner-condition")
:threadnil
Class: runner ()

Basic runner. Runs task as soon as scheduled.

Package

simple-tasks

Source

runner.lisp (file)

Direct superclasses

status-object (class)

Direct subclasses

queued-runner (class)

Direct methods
Class: status-object ()

A class that has a status.

Package

simple-tasks

Source

status.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: status
Initform

:created

Readers

status (generic function)

Writers

(setf status) (generic function)

Class: task ()

Basic task class.

Package

simple-tasks

Source

task.lisp (file)

Direct superclasses

status-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: runner
Readers

runner (generic function)

Writers

(setf runner) (generic function)

Slot: error-environment
Readers

error-environment (generic function)

Writers

(setf error-environment) (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.7 Types

Type: status ()

A status can be a SYMBOL, a STATUS-OBJECT, or a LIST composed of SYMBOLs.

Package

simple-tasks

Source

status.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *current-queue*

Bound to either NIL or the current queue being processed by the queued-runner.

See QUEUED-RUNNER

Package

simple-tasks

Source

runner.lisp (file)

Special Variable: *current-task*

Bound to either NIL or the current task being processed by the queued-runner.

Package

simple-tasks

Source

runner.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: setdocs &body PAIRS

Easily set the documentation.

Package

simple-tasks

Source

documentation.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: checkdocs &optional PACKAGE

Check that all functions, classes, and variables have docstrings.

Package

simple-tasks

Source

documentation.lisp (file)

Function: status-list-p LIST

Returns true if every element in the list is a symbol and the list thus qualifies as a STATUS.

Package

simple-tasks

Source

status.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: %set-back-queue NEW-VALUE OBJECT
Package

simple-tasks

Methods
Method: %set-back-queue NEW-VALUE (QUEUED-RUNNER queued-runner)

automatically generated writer method

Source

runner.lisp (file)

Generic Function: %set-queue NEW-VALUE OBJECT
Package

simple-tasks

Methods
Method: %set-queue NEW-VALUE (QUEUED-RUNNER queued-runner)

automatically generated writer method

Source

runner.lisp (file)

Generic Function: %set-thread NEW-VALUE OBJECT
Package

simple-tasks

Methods
Method: %set-thread NEW-VALUE (QUEUED-RUNNER queued-runner)

automatically generated writer method

Source

runner.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, simple-tasks.asd: The simple-tasks<dot>asd file
File, Lisp, simple-tasks/documentation.lisp: The simple-tasks/documentation<dot>lisp file
File, Lisp, simple-tasks/package.lisp: The simple-tasks/package<dot>lisp file
File, Lisp, simple-tasks/runner.lisp: The simple-tasks/runner<dot>lisp file
File, Lisp, simple-tasks/status.lisp: The simple-tasks/status<dot>lisp file
File, Lisp, simple-tasks/task.lisp: The simple-tasks/task<dot>lisp file
File, Lisp, simple-tasks/toolkit.lisp: The simple-tasks/toolkit<dot>lisp file

L
Lisp File, simple-tasks.asd: The simple-tasks<dot>asd file
Lisp File, simple-tasks/documentation.lisp: The simple-tasks/documentation<dot>lisp file
Lisp File, simple-tasks/package.lisp: The simple-tasks/package<dot>lisp file
Lisp File, simple-tasks/runner.lisp: The simple-tasks/runner<dot>lisp file
Lisp File, simple-tasks/status.lisp: The simple-tasks/status<dot>lisp file
Lisp File, simple-tasks/task.lisp: The simple-tasks/task<dot>lisp file
Lisp File, simple-tasks/toolkit.lisp: The simple-tasks/toolkit<dot>lisp file

S
simple-tasks.asd: The simple-tasks<dot>asd file
simple-tasks/documentation.lisp: The simple-tasks/documentation<dot>lisp file
simple-tasks/package.lisp: The simple-tasks/package<dot>lisp file
simple-tasks/runner.lisp: The simple-tasks/runner<dot>lisp file
simple-tasks/status.lisp: The simple-tasks/status<dot>lisp file
simple-tasks/task.lisp: The simple-tasks/task<dot>lisp file
simple-tasks/toolkit.lisp: The simple-tasks/toolkit<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   B   C   E   F   G   I   L   M   Q   R   S   T   W  
Index Entry  Section

%
%set-back-queue: Internal generic functions
%set-back-queue: Internal generic functions
%set-queue: Internal generic functions
%set-queue: Internal generic functions
%set-thread: Internal generic functions
%set-thread: Internal generic functions

(
(setf callback): Exported generic functions
(setf callback): Exported generic functions
(setf cvar): Exported generic functions
(setf cvar): Exported generic functions
(setf error-environment): Exported generic functions
(setf error-environment): Exported generic functions
(setf func): Exported generic functions
(setf func): Exported generic functions
(setf lock): Exported generic functions
(setf lock): Exported generic functions
(setf return-values): Exported generic functions
(setf return-values): Exported generic functions
(setf runner): Exported generic functions
(setf runner): Exported generic functions
(setf runner): Exported generic functions
(setf status): Exported generic functions
(setf status): Exported generic functions
(setf task): Exported generic functions
(setf task): Exported generic functions

A
await: Exported generic functions
await: Exported generic functions
await: Exported generic functions

B
back-queue: Exported generic functions
back-queue: Exported generic functions

C
call-as-task: Exported functions
callback: Exported generic functions
callback: Exported generic functions
checkdocs: Internal functions
cvar: Exported generic functions
cvar: Exported generic functions
cvar: Exported generic functions

E
error-environment: Exported generic functions
error-environment: Exported generic functions

F
func: Exported generic functions
func: Exported generic functions
Function, call-as-task: Exported functions
Function, checkdocs: Internal functions
Function, make-runner-thread: Exported functions
Function, status-list-p: Internal functions

G
Generic Function, %set-back-queue: Internal generic functions
Generic Function, %set-queue: Internal generic functions
Generic Function, %set-thread: Internal generic functions
Generic Function, (setf callback): Exported generic functions
Generic Function, (setf cvar): Exported generic functions
Generic Function, (setf error-environment): Exported generic functions
Generic Function, (setf func): Exported generic functions
Generic Function, (setf lock): Exported generic functions
Generic Function, (setf return-values): Exported generic functions
Generic Function, (setf runner): Exported generic functions
Generic Function, (setf status): Exported generic functions
Generic Function, (setf task): Exported generic functions
Generic Function, await: Exported generic functions
Generic Function, back-queue: Exported generic functions
Generic Function, callback: Exported generic functions
Generic Function, cvar: Exported generic functions
Generic Function, error-environment: Exported generic functions
Generic Function, func: Exported generic functions
Generic Function, interrupt-task: Exported generic functions
Generic Function, lock: Exported generic functions
Generic Function, queue: Exported generic functions
Generic Function, return-values: Exported generic functions
Generic Function, run-task: Exported generic functions
Generic Function, runner: Exported generic functions
Generic Function, schedule-task: Exported generic functions
Generic Function, start-runner: Exported generic functions
Generic Function, status: Exported generic functions
Generic Function, status=: Exported generic functions
Generic Function, stop-runner: Exported generic functions
Generic Function, task: Exported generic functions
Generic Function, task-ready-p: Exported generic functions
Generic Function, thread: Exported generic functions

I
interrupt-task: Exported generic functions
interrupt-task: Exported generic functions
interrupt-task: Exported generic functions
interrupt-task: Exported generic functions
interrupt-task: Exported generic functions

L
lock: Exported generic functions
lock: Exported generic functions
lock: Exported generic functions

M
Macro, setdocs: Internal macros
Macro, with-body-as-task: Exported macros
make-runner-thread: Exported functions
Method, %set-back-queue: Internal generic functions
Method, %set-queue: Internal generic functions
Method, %set-thread: Internal generic functions
Method, (setf callback): Exported generic functions
Method, (setf cvar): Exported generic functions
Method, (setf error-environment): Exported generic functions
Method, (setf func): Exported generic functions
Method, (setf lock): Exported generic functions
Method, (setf return-values): Exported generic functions
Method, (setf runner): Exported generic functions
Method, (setf runner): Exported generic functions
Method, (setf status): Exported generic functions
Method, (setf task): Exported generic functions
Method, await: Exported generic functions
Method, await: Exported generic functions
Method, back-queue: Exported generic functions
Method, callback: Exported generic functions
Method, cvar: Exported generic functions
Method, cvar: Exported generic functions
Method, error-environment: Exported generic functions
Method, func: Exported generic functions
Method, interrupt-task: Exported generic functions
Method, interrupt-task: Exported generic functions
Method, interrupt-task: Exported generic functions
Method, interrupt-task: Exported generic functions
Method, lock: Exported generic functions
Method, lock: Exported generic functions
Method, queue: Exported generic functions
Method, return-values: Exported generic functions
Method, return-values: Exported generic functions
Method, run-task: Exported generic functions
Method, run-task: Exported generic functions
Method, run-task: Exported generic functions
Method, run-task: Exported generic functions
Method, runner: Exported generic functions
Method, runner: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, schedule-task: Exported generic functions
Method, start-runner: Exported generic functions
Method, start-runner: Exported generic functions
Method, start-runner: Exported generic functions
Method, start-runner: Exported generic functions
Method, status: Exported generic functions
Method, status=: Exported generic functions
Method, status=: Exported generic functions
Method, status=: Exported generic functions
Method, status=: Exported generic functions
Method, status=: Exported generic functions
Method, status=: Exported generic functions
Method, stop-runner: Exported generic functions
Method, stop-runner: Exported generic functions
Method, stop-runner: Exported generic functions
Method, task: Exported generic functions
Method, task-ready-p: Exported generic functions
Method, thread: Exported generic functions

Q
queue: Exported generic functions
queue: Exported generic functions

R
return-values: Exported generic functions
return-values: Exported generic functions
return-values: Exported generic functions
run-task: Exported generic functions
run-task: Exported generic functions
run-task: Exported generic functions
run-task: Exported generic functions
run-task: Exported generic functions
runner: Exported generic functions
runner: Exported generic functions
runner: Exported generic functions

S
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
schedule-task: Exported generic functions
setdocs: Internal macros
start-runner: Exported generic functions
start-runner: Exported generic functions
start-runner: Exported generic functions
start-runner: Exported generic functions
start-runner: Exported generic functions
status: Exported generic functions
status: Exported generic functions
status-list-p: Internal functions
status=: Exported generic functions
status=: Exported generic functions
status=: Exported generic functions
status=: Exported generic functions
status=: Exported generic functions
status=: Exported generic functions
status=: Exported generic functions
stop-runner: Exported generic functions
stop-runner: Exported generic functions
stop-runner: Exported generic functions
stop-runner: Exported generic functions

T
task: Exported generic functions
task: Exported generic functions
task-ready-p: Exported generic functions
task-ready-p: Exported generic functions
thread: Exported generic functions
thread: Exported generic functions

W
with-body-as-task: Exported macros

Jump to:   %   (  
A   B   C   E   F   G   I   L   M   Q   R   S   T   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
B   C   E   F   L   Q   R   S   T  
Index Entry  Section

*
*current-queue*: Internal special variables
*current-task*: Internal special variables
*runner*: Exported special variables

+
+no-threading-stump+: Exported special variables
+status-ended+: Exported special variables
+status-running+: Exported special variables
+status-started+: Exported special variables

B
back-queue: Exported classes

C
callback: Exported classes
cvar: Exported classes
cvar: Exported classes

E
error-environment: Exported classes

F
func: Exported classes

L
lock: Exported classes
lock: Exported classes

Q
queue: Exported classes

R
return-values: Exported classes
runner: Exported conditions
runner: Exported classes

S
Slot, back-queue: Exported classes
Slot, callback: Exported classes
Slot, cvar: Exported classes
Slot, cvar: Exported classes
Slot, error-environment: Exported classes
Slot, func: Exported classes
Slot, lock: Exported classes
Slot, lock: Exported classes
Slot, queue: Exported classes
Slot, return-values: Exported classes
Slot, runner: Exported conditions
Slot, runner: Exported classes
Slot, status: Exported classes
Slot, task: Exported conditions
Slot, thread: Exported classes
Special Variable, *current-queue*: Internal special variables
Special Variable, *current-task*: Internal special variables
Special Variable, *runner*: Exported special variables
Special Variable, +no-threading-stump+: Exported special variables
Special Variable, +status-ended+: Exported special variables
Special Variable, +status-running+: Exported special variables
Special Variable, +status-started+: Exported special variables
status: Exported classes

T
task: Exported conditions
thread: Exported classes

Jump to:   *   +  
B   C   E   F   L   Q   R   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   C   N   P   Q   R   S   T  
Index Entry  Section

B
blocking-call-task: Exported classes
blocking-task: Exported classes

C
call-task: Exported classes
callback-task: Exported classes
Class, blocking-call-task: Exported classes
Class, blocking-task: Exported classes
Class, call-task: Exported classes
Class, callback-task: Exported classes
Class, no-threading-stump: Exported classes
Class, notifying-task: Exported classes
Class, queued-runner: Exported classes
Class, runner: Exported classes
Class, status-object: Exported classes
Class, task: Exported classes
Condition, runner-condition: Exported conditions
Condition, runner-not-started: Exported conditions
Condition, runner-not-stopped: Exported conditions
Condition, task-already-scheduled: Exported conditions
Condition, task-condition: Exported conditions
Condition, task-errored: Exported conditions

N
no-threading-stump: Exported classes
notifying-task: Exported classes

P
Package, simple-tasks: The simple-tasks package

Q
queued-runner: Exported classes

R
runner: Exported classes
runner-condition: Exported conditions
runner-not-started: Exported conditions
runner-not-stopped: Exported conditions

S
simple-tasks: The simple-tasks system
simple-tasks: The simple-tasks package
status: Exported types
status-object: Exported classes
System, simple-tasks: The simple-tasks system

T
task: Exported classes
task-already-scheduled: Exported conditions
task-condition: Exported conditions
task-errored: Exported conditions
Type, status: Exported types

Jump to:   B   C   N   P   Q   R   S   T