The sento Reference Manual

This is the sento Reference Manual, version 3.4.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:00:32 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 sento

Actor framework featuring actors and agents for easy access to state and asynchronous operations.

Author

Manfred Bergmann

License

Apache-2

Version

3.4.0

Dependencies
  • alexandria (system).
  • log4cl (system).
  • bordeaux-threads (system).
  • cl-speedy-queue (system).
  • str (system).
  • blackbird (system).
  • binding-arrows (system).
  • timer-wheel (system).
  • local-time-duration (system).
  • atomics (system).
Source

sento.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 sento/src

Source

sento.asd.

Parent Component

sento (system).

Child Components

3.2 sento/src/atomic

Source

sento.asd.

Parent Component

src (module).

Child Components

3.3 sento/src/queue

Dependency

dispatcher-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Child Components

3.4 sento/src/mbox

Dependency

queue (module).

Source

sento.asd.

Parent Component

src (module).

Child Component

message-box.lisp (file).


3.5 sento/src/agent-usecase

Dependency

actor-system.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Child Components

4 Files

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


4.1 Lisp


4.1.1 sento/sento.asd

Source

sento.asd.

Parent Component

sento (system).

ASDF Systems

sento.


4.1.2 sento/src/atomic/atomic-api.lisp

Source

sento.asd.

Parent Component

atomic (module).

Packages

sento.atomic.

Public Interface

4.1.3 sento/src/atomic/atomic.lisp

Source

sento.asd.

Parent Component

atomic (module).

Public Interface
Internals

4.1.4 sento/src/config.lisp

Dependency

atomic (module).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.config.

Public Interface
Internals

%merge-config (function).


4.1.5 sento/src/wheel-timer.lisp

Dependency

config.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.wheel-timer.

Public Interface
Internals

4.1.6 sento/src/timeutils.lisp

Dependency

wheel-timer.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.timeutils.

Public Interface
Internals

wait-time (reader method).


4.1.7 sento/src/miscutils.lisp

Dependency

timeutils.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.miscutils.

Public Interface

4.1.8 sento/src/fcomputation.lisp

Dependency

miscutils.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.future.

Public Interface
Internals

4.1.9 sento/src/dispatcher-api.lisp

Dependency

fcomputation.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.dispatcher.

Public Interface

4.1.10 sento/src/queue/queue.lisp

Source

sento.asd.

Parent Component

queue (module).

Packages

sento.queue.

Public Interface
Internals

4.1.11 sento/src/queue/queue-locked.lisp

Source

sento.asd.

Parent Component

queue (module).

Public Interface
Internals

4.1.12 sento/src/mbox/message-box.lisp

Source

sento.asd.

Parent Component

mbox (module).

Packages

sento.messageb.

Public Interface
Internals

4.1.13 sento/src/actor-cell.lisp

Dependency

mbox (module).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.actor-cell.

Public Interface
Internals

4.1.14 sento/src/actor-api.lisp

Dependency

actor-cell.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.actor.

Public Interface
Internals

receive (reader method).


4.1.15 sento/src/eventstream-api.lisp

Dependency

actor-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.eventstream.

Public Interface

4.1.16 sento/src/actor-system-api.lisp

Dependency

eventstream-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.actor-system.

Public Interface

*default-config* (special variable).


4.1.17 sento/src/actor-context-api.lisp

Dependency

actor-system-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.actor-context.

Public Interface
Internals

name (reader method).


4.1.18 sento/src/fasync-completed.lisp

Dependency

actor-context-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.async-future.

Public Interface

fasync-completed (macro).


4.1.19 sento/src/actor.lisp

Dependency

fasync-completed.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.20 sento/src/agent.lisp

Dependency

actor.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.agent.

Public Interface
Internals

receive (function).


4.1.21 sento/src/eventstream.lisp

Dependency

agent.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.22 sento/src/fsm.lisp

Dependency

eventstream.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.fsm.

Public Interface
Internals

4.1.23 sento/src/tasks.lisp

Dependency

fsm.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.tasks.

Public Interface
Internals

make-task (function).


4.1.24 sento/src/router.lisp

Dependency

tasks.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.router.

Public Interface
Internals

4.1.25 sento/src/stash.lisp

Dependency

router.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.stash.

Public Interface
Internals

stashed-messages (reader method).


4.1.26 sento/src/dispatcher.lisp

Dependency

stash.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

receive (function).


4.1.27 sento/src/actor-context.lisp

Dependency

dispatcher.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.28 sento/src/actor-system.lisp

Dependency

actor-context.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.29 sento/src/agent-usecase/agent-usecase-commons.lisp

Source

sento.asd.

Parent Component

agent-usecase (module).

Packages

sento.agent.usecase-commons.

Public Interface
Internals

4.1.30 sento/src/agent-usecase/hash-agent.lisp

Source

sento.asd.

Parent Component

agent-usecase (module).

Packages

sento.agent.hash.

Public Interface
Internals

agent-puthash (function).


4.1.31 sento/src/agent-usecase/array-agent.lisp

Source

sento.asd.

Parent Component

agent-usecase (module).

Packages

sento.agent.array.

Public Interface
Internals

agent-set (function).


4.1.32 sento/src/package.lisp

Dependency

agent-usecase (module).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.user.


5 Packages

Packages are listed by definition order.


5.1 sento.config

Source

config.lisp.

Nickname

config

Use List

common-lisp.

Public Interface
Internals

%merge-config (function).


5.2 sento.dispatcher

Source

dispatcher-api.lisp.

Nickname

disp

Use List

common-lisp.

Public Interface
Internals

receive (function).


5.3 sento.timeutils

Source

timeutils.lisp.

Nickname

timeutils

Use List

common-lisp.

Public Interface
Internals

wait-time (generic reader).


5.4 sento.queue

Source

queue.lisp.

Nickname

queue

Use List

common-lisp.

Used By List

sento.messageb.

Public Interface
Internals

5.5 sento.wheel-timer

Source

wheel-timer.lisp.

Nickname

wt

Use List

common-lisp.

Public Interface
Internals

5.6 sento.async-future

Source

fasync-completed.lisp.

Nickname

async-future

Use List
Public Interface

fasync-completed (macro).


5.7 sento.messageb

Source

message-box.lisp.

Nickname

mesgb

Use List
Public Interface
Internals

5.8 sento.stash

Source

stash.lisp.

Nickname

stash

Use List

common-lisp.

Public Interface
Internals

stashed-messages (generic reader).


5.9 sento.atomic

Source

atomic-api.lisp.

Nickname

atomic

Use List

common-lisp.

Public Interface
Internals

5.10 sento.agent.array

Source

array-agent.lisp.

Nickname

agtarray

Use List
Used By List

sento.user.

Public Interface
Internals

agent-set (function).


5.12 sento.agent.hash

Source

hash-agent.lisp.

Nickname

agthash

Use List
Used By List

sento.user.

Public Interface
Internals

agent-puthash (function).


5.13 sento.router

Source

router.lisp.

Nickname

router

Use List

common-lisp.

Public Interface
Internals

5.14 sento.miscutils

Source

miscutils.lisp.

Nickname

miscutils

Use List

common-lisp.

Public Interface

5.15 sento.agent.usecase-commons

Source

agent-usecase-commons.lisp.

Nickname

agent.usecase-commons

Use List

common-lisp.

Used By List
Public Interface
Internals

5.16 sento.future

Source

fcomputation.lisp.

Nickname

future

Use List
  • blackbird.
  • common-lisp.
Used By List
Public Interface
Internals

5.17 sento.actor-system

Source

actor-system-api.lisp.

Nickname

asys

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.18 sento.eventstream

Source

eventstream-api.lisp.

Nickname

ev

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.19 sento.tasks

Source

tasks.lisp.

Nickname

tasks

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

make-task (function).


5.20 sento.fsm

Source

fsm.lisp.

Nickname

fsm

Use List
Public Interface
Internals

5.21 sento.actor-cell

Source

actor-cell.lisp.

Nickname

act-cell

Use List

common-lisp.

Public Interface
Internals

5.22 sento.actor

Source

actor-api.lisp.

Nickname

act

Use List

common-lisp.

Used By List
Public Interface
Internals

5.23 sento.actor-context

Source

actor-context-api.lisp.

Nickname

ac

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.24 sento.agent

Source

agent.lisp.

Nickname

agt

Use List
Used By List

sento.user.

Public Interface
Internals

receive (function).


6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *default-config*

The default config used when creating an ‘asys:actor-system‘.
The actor-system constructor allows to provide custom config options that override the default.

Package

sento.actor-system.

Source

actor-system-api.lisp.

Special Variable: *event-data*

Dynamically binds event data when msg/event was sent with data (‘cons’)

Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *next-state-data*

Dynamically binds the next state data (‘on-transition’).
Effectively same as ‘*event-data*’ but should be used in different context.

Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *received-event*

Dynamically binds the received event (message).

Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *self*

The ’own’ actor instance. Dynamically bound and available upon calling ‘receive‘ function.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Special Variable: *sender*

The ‘*sender*‘ is dynamically bound and available in ‘receive‘ function, when it is known.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Special Variable: *state*

The ’state’ of the actor. Dynamically bound and available in ‘receive‘ function.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Special Variable: *state-data*

Dynamically binds the current state data.

Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *task-context*

Optionally set this globally to use the API without using ‘with-context‘.

Package

sento.tasks.

Source

tasks.lisp.

Special Variable: *task-dispatcher*

Optionally set a dispatcher id. Same applies here as for ‘*task-context*‘.

Package

sento.tasks.

Source

tasks.lisp.


6.1.2 Symbol macros

Symbol Macro: *self*
Package

sento.actor.

Source

actor.lisp.

Symbol Macro: *sender*
Package

sento.actor.

Source

actor.lisp.

Symbol Macro: *state*
Package

sento.actor.

Source

actor.lisp.


6.1.3 Macros

Macro: await-cond (max-time &body body)

Awaits condition. Probes repeatedly.
If after ‘max-time’ condition is not ‘t’ it is considered failed.

Package

sento.miscutils.

Source

miscutils.lisp.

Macro: fasync-completed (future context dispatcher-id (result) &body body)

Asynchronous future completion handler.

This work essentially the same as ‘future:fcompleted‘ except that the completion function executes in a different execution context. The ’execution-context’ is a dispatcher (‘disp:dispatcher‘) registered in ‘asys:actor-system‘.
It is here identified using ‘dispatcher-id‘ (the defailt dispatcher identifier is ‘:shared‘).
The additional parameter ‘context‘ can be the actor-system itself, an ‘ac:actor-context‘ or an ‘act:actor‘ instance.

If the completion handler should execute on the caller thread, then ‘future:fcompleted‘ should be used.

If the ‘future‘ is already complete then the ‘body‘ executes immediately.
‘result‘ represents the future result.
‘body‘ is executed when future completed.
Returns the future.

Example:

“‘
(fasync-completed (with-fut (sleep .5) 1) asys :shared
(result)
(format t "Future result ~a~%" result))
“‘

Package

sento.async-future.

Source

fasync-completed.lisp.

Macro: fcompleted (future (result) &body body)

Completion handler on the given ‘future‘.

If the ‘future‘ is already complete then the ‘body‘ executes immediately.
‘result‘ represents the future result.
‘body‘ is executed when future completed.
Returns the future.

Notes on execution context:
By calling ‘fcompleted‘ a completion function is installed on the ‘future‘.
If the ‘future‘s execute function is not delaying or called by the same thread as the one calling ‘fcompleted‘,
then ‘body‘ is called by the callers thread.
If, however, the ‘future‘ is delaying and doing computation in another thread and later also resolving the ‘future‘ in that thread (this depends on how the ‘future‘ is defined), then the ‘body‘ form is executed by the thread that is resolving the ‘future‘.

Example:

“‘
(fcompleted (with-fut
(sleep .5)
1)
(result)
(format t "Future result ~a~%" result))
“‘

Package

sento.future.

Source

fcomputation.lisp.

Macro: fmap (future (result) &body body)

‘fmap‘ maps a future.

‘future‘ is the future that is mapped.
‘result‘ is the result of the future when it completed.
‘body‘ is the form that executes when the future is completed. The result of ‘body‘ generates a new future.

Notes on execution context:
By calling ‘fmap‘ a mapping function is installed on the ‘future‘.
If the ‘future‘s execute function is not delaying or called by the same thread as the one calling ‘fmap‘,
then ‘body‘ is called by the callers thread.
If, however, the ‘future‘ is delaying and doing computation in another thread and later also resolving the ‘future‘ in that thread (this depends on how the ‘future‘ is defined), then the ‘body‘ form is executed by the thread that is resolving the ‘future‘.

Example:

“‘
(fmap (with-fut 0) (result)
(1+ result))
“‘

Package

sento.future.

Source

fcomputation.lisp.

Macro: frecover (future &rest handler-forms)

Catch errors in futures using ‘frecover‘ It works similar to ‘handler-case‘.

Example:

“‘
(fresult
(frecover
(-> (with-fut 0)
(fmap (value)
(declare (ignore value)) (error "foo")))
(fmap (value)
(+ value 1))))
(error (c) (format nil "~a" c)))) “‘

Package

sento.future.

Source

fcomputation.lisp.

Macro: goto-state (next-state &optional data)

‘goto-state‘ Macro

The ‘goto-state‘ macro is used to transition the FSM (Finite State Machine) to a specified state, with optional data setting for the state model. This macro simplifies state management by providing a direct mechanism to switch states and update state-specific data.

**Parameters**

- ‘state‘: The target state to which the FSM should transition. This can be a symbol or any other datatype representing the state, consistent with the FSM’s state representation.

- ‘data‘: An optional parameter to set the data associated with the new state. This allows for updating the state model with relevant information during the transition.

**Description**

The ‘goto-state‘ macro facilitates explicit state transitions and optionally updates the state model’s data. It is typically invoked in response to specific conditions or events, allowing dynamic integration with other FSM constructs like ‘when-state‘ or ‘on-event‘.

**Usage Example**

“‘lisp
(when-state (’idle :test #’eq :timeout-s 5)
(on-event (’start)
(goto-state ’active ’("Session ID: 123"))
(perform-initialization)))

(when-state (’active :test #’eq)
(on-event (’stop)
(goto-state ’idle ’("Clean exit"))
(perform-cleanup)))
“‘

In this example:
- The FSM transitions to the ‘active‘ state with associated data ‘"Session ID: 123"‘ upon receiving a ‘start‘ event while in the ‘idle‘ state, executing ‘perform-initialization‘.
- It transitions back to the ‘idle‘ state with data ‘"Clean exit"‘ when the ‘stop‘ event occurs while the FSM is in the ‘active‘ state, executing ‘perform-cleanup‘.

**Notes**

- Ensure that ‘state‘ is valid within the FSM’s state space and that the transition complies with the FSM’s logic and rules.
- The ‘data‘ parameter is optional, but when used, should be structured appropriately to fit the state model’s requirements.

The ‘goto-state‘ macro, with its optional ‘data‘ capability, enhances flexibility and precision in managing FSM state transitions and data updates. Adjust the usage examples and structure to align with your FSM’s specific needs and design.

Package

sento.fsm.

Source

fsm.lisp.

Macro: on-event ((event &key test) &body body)

‘on-event‘ Macro

The ‘on-event‘ macro defines actions to be executed when specific events occur within an FSM (Finite State Machine). It is often used within the ‘when-state‘ macro to enable conditional execution based on state and optional timeout constraints.

**Parameters**

- ‘event‘: The event name or identifier to be monitored. This argument specifies which event should trigger the execution of the provided body.

- ‘:state-timeout‘: A tag indicating that the execution of this event’s actions is subject to the ‘:timeout-s‘ specified in a surrounding ‘when-state‘ macro.

- ‘body‘: One or more expressions representing the actions to be executed when the specified event occurs.

**Description**

The ‘on-event‘ macro facilitates event-driven actions within FSMs. When used within a ‘when-state‘ block and tagged with ‘:state-timeout‘, it ensures that the actions are executed within a specified time period after the event occurs, contingent on the current state of the FSM.

**Usage Example**

“‘lisp
(when-state (’active :test #’eq :timeout-s 10)
(on-event ’start :state-timeout
(start-activity))
(on-event ’stop
(stop-activity)))
“‘

In this example:
- The ‘start-activity‘ action is executed when the ‘start‘ event occurs, provided the FSM is in the ‘active‘ state within the 10-second timeout duration.
- The ‘stop-activity‘ is triggered by a ‘stop‘ event without timeout constraints.

**Notes**

- ‘:state-timeout‘ indicates that the timeout from ‘when-state‘ should apply to this event’s execution.
- Ensure the event detection mechanism within your FSM can recognize and handle the specified ‘event‘ argument.

Use ‘on-event‘ macros within ‘when-state‘ to manage event responses systematically and within time constraints defined for specific states. Adjust the actions and logic as necessary for your FSM’s behavior.

Package

sento.fsm.

Source

fsm.lisp.

Macro: on-transition ((transition &key test) &body body)

‘on-transition‘ Macro

The ‘on-transition‘ macro defines actions to be executed when a specific state transition occurs within an FSM (Finite State Machine). It uses customizable test functions to determine when a transition has taken place.

**Parameters**

- ‘transition‘: A cons cell or similar paired structure representing the transition, with the car as the starting state and the cdr as the destination state.

- ‘:test‘: A key parameter specifying the function used to compare states. Defaults to ‘#’eq‘, allowing for custom comparison logic if needed.

- ‘body‘: One or more expressions that are executed when the specified transition is detected.

**Description**

The ‘on-transition‘ macro provides a mechanism for executing specific actions when the FSM undergoes a particular state transition, as identified by changes in the state model from a starting to an ending state. This macro depends on events being handled by a state transition (‘goto-state‘), and uses test functions to match state values.

**Usage Example**

“‘lisp
(on-transition ((’idle . ’active) :test #’eq)
(log:info "Transitioned from idle to active")
(initialize-resources))

(on-transition ((’active . ’completed) :test #’eq)
(log:info "Transitioned from active to completed")
(cleanup-resources))
“‘

In these examples:
- The first block logs the transition from ‘idle‘ to ‘active‘ and performs resource initialization when this transition occurs.
- The second block logs the transition from ‘active‘ to ‘completed‘ and performs cleanup.

**Notes**

- ‘:test‘: Customize the comparison logic to fit the FSM’s state representations, especially if using complex or non-standard states.
- The macro relies on transitions being marked by the handling of events through ‘goto-state‘.

Utilize the ‘on-transition‘ macro to effectively manage and isolate logic specific to state transitions, ensuring that your FSM operates smoothly and predictably through defined state changes. Adjust the body of transitions to align with the goals and behavior of your FSM system.

Package

sento.fsm.

Source

fsm.lisp.

Macro: stay-on-state (&optional data)

‘stay-on-state‘ Macro

The ‘stay-on-state‘ macro is used to maintain the FSM (Finite State Machine) in its current state, with an option to update the state’s associated data. This is useful for situations where the state needs to persist while its data is updated.

**Parameters**

- ‘data‘: An optional parameter to update the data related to the current state. This allows for modifying the state model with new information without changing the state itself.

**Description**

The ‘stay-on-state‘ macro provides a way to remain in the current state of an FSM while updating any associated data. It can be used in reaction to specific events or conditions, maintaining state continuity while making data adjustments.

**Usage Example**

“‘lisp
(when-state (’processing :test #’eq)
(on-event (’update)
(stay-on-state ’("Progress: 50%"))
(log-update)))

(when-state (’processing :test #’eq)
(on-event (’complete)
(goto-state ’completed ’("Finished successfully"))))
“‘

In this example:
- The ‘stay-on-state‘ macro is used to remain in the ‘processing‘ state while updating the progress data to ‘"Progress: 50%"‘ upon an ‘update‘ event.
- Transition to the ‘completed‘ state occurs when the ‘complete‘ event is triggered, updating the state and its data.

**Notes**

- The ‘data‘ parameter is optional but should be structured to fit the requirements of the state model.
- Use this macro to ensure state persistence with updated data when necessary.

Integrate the ‘stay-on-state‘ macro into your FSM to handle cases where the state should remain unchanged but its data requires updates. Adjust examples as needed to fit your FSM system.

Package

sento.fsm.

Source

fsm.lisp.

Macro: when-state ((state &key test timeout-s) &body body)

‘when-state‘ Macro

The ‘when-state‘ macro is used to conditionally execute a body of code when a defined condition on the FSM’s (Finite State Machine) current state is met, with support for custom predicates and timeout management for nested ‘on-event‘ macros.

**Parameters**

- ‘state‘: An arbitrary value or structure that represents the state to be checked against the FSM’s current state. The usage and type should align with the ‘:test‘ function.

- ‘:test‘: A predicate function used to evaluate if the FSM’s current state matches the ‘state‘ argument. The default is ‘#’eq‘, but can be customized with other functions or lambdas.

- ‘:timeout-s‘: An optional timeout in seconds that is applied to ‘on-event‘ macro calls tagged with ‘:state-timeout‘ within the body.

- ‘body‘: One or more forms, typically including ‘on-event‘ macro definitions, executed if the state condition is satisfied.

**Description**

‘when-state‘ enables dynamic state-based programming within FSMs, allowing for flexible condition evaluation with customizable predicate functions. It also manages execution timeouts for actions specified within nested ‘on-event‘ calls. The ‘:timeout-s‘ parameter, when used with the ‘:state-timeout‘ tag, ensures operations are constrained to a specified period.

**Usage Example**

“‘lisp
(when-state (’active :test #’eq :timeout-s 10)
(on-event (’start) :state-timeout
(start-activity))
(on-event (’stop)
(stop-activity)))
“‘

In this example:
- ‘start-activity‘ is executed if the current FSM state is exactly ‘’active‘, using ‘:test #’eq‘, within the 10-second window specified by ‘:timeout-s‘ and tagged with ‘:state-timeout‘.
- ‘stop-activity‘ runs upon receiving a ‘stop‘ event, without timeout constraints.

**Notes**

- Adjust the ‘:test‘ predicate to suit the structure and type of your ‘state‘ input as needed.
- ‘:timeout-s‘ specifies a duration within which tagged events should occur, integrating with the ‘on-event‘ macro.
- Ensure that each ‘on-event‘ is properly enclosed in parentheses, reflecting its syntax.

Use the appropriate predicate function to match the ‘state‘ argument’s format, ensuring meaningful and effective FSM operations.

Package

sento.fsm.

Source

fsm.lisp.

Macro: when-unhandled ((event &key test) &body body)

‘when-unhandled‘ Macro

The ‘when-unhandled‘ macro defines actions to be executed when an event has not been handled by any prior ‘stay-on-state‘ or ‘goto-state‘ operations within an FSM (Finite State Machine).

**Parameters**

- ‘event‘: The event that should trigger the body if it remains unhandled by other mechanisms in the FSM.

- ‘:test‘: A key parameter specifying the function used to compare the received event with the specified event. Defaults to ‘#’eq‘, allowing for custom comparison logic.

- ‘body‘: One or more expressions to execute when the specified event is unhandled by ‘stay-on-state‘ or ‘goto-state‘ actions.

**Description**

The ‘when-unhandled‘ macro is designed to catch events that have not been processed by ‘stay-on-state‘ or ‘goto-state‘. It provides a fallback mechanism that ensures specific actions are taken for such unhandled events, using a specified test function to determine event equivalency.

**Usage Example**

“‘lisp
(when-unhandled (’start :test #’eq)
(log:error "Start event was unhandled")
(notify-admin))

(when-unhandled (’disconnect :test #’eq)
(log:warn "Unhandled disconnect event")
(attempt-reconnect))
“‘

In these examples:
- The first block logs an error and notifies an admin if the ‘start‘ event remains unhandled, using the default ‘#’eq‘ function for testing.
- The second block logs a warning and attempts to reconnect for an unhandled ‘disconnect‘ event, also using ‘#’eq‘.

**Notes**

- Utilize the ‘test‘ parameter to customize how events are determined as equivalent when necessary.
- ‘when-unhandled‘ is essential for capturing and managing scenarios where standard state transitions do not account for all event possibilities.
- Is it possible to use ‘goto-state‘ in ‘body‘.

Integrate the ‘when-unhandled‘ macro to ensure your FSM handles any unexpected or default cases robustly and flexibly. Adjust the body actions and events as needed for your specific requirements and FSM design.

Package

sento.fsm.

Source

fsm.lisp.

Macro: with-context ((context &optional dispatcher) &body body)

‘with-context‘ creates an environment where the ‘tasks‘ package functions should be used in.
‘context‘ can be either an ‘asys:actor-system‘, an ‘ac:actor-context‘, or an ‘act:actor‘ (or subclass).
‘dispatcher‘ specifies the dispatcher where the tasks is executed in (like thread-pool).
The tasks created using the ‘tasks‘ functions will then be created in the given context.

Example:

“‘elisp
;; create actor-system
(defparameter *sys* (make-actor-system))

(with-context (*sys*)
(task-yield (lambda () (+ 1 1))))

=> 2 (2 bits, #x2, #o2, #b10)

“‘

Since the default ‘:shared‘ dispatcher should mainly be used for the message dispatching,
but not so much for longer running tasks it is possible to create an actor system with additional
dispatchers. This additional dispatcher can be utilized for ‘tasks‘. Be aware that the config as used below is merged with the ‘asys:*default-config*‘ which means that the dispatcher ‘:foo‘ here is really an additional dispatcher.

“‘
;; create actor-system with additional (custom) dispatcher
(defparameter *sys* (asys:make-actor-system ’(:dispatchers (:foo (:workers 16)))))

(with-context (*sys* :foo)
(task-yield (lambda () (+ 1 1))))

“‘

Package

sento.tasks.

Source

tasks.lisp.

Macro: with-fut (&body body)

Convenience macro for creating a ‘future‘.

The ‘future‘ will be resolved with the result of the body form.

Package

sento.future.

Source

fcomputation.lisp.

Macro: with-fut-resolve (&body body)

Convenience macro for creating a ‘future‘ that must be resolved manually via ‘fresolve‘.

This allows to spawn threads or other asynchronous operations as part of ‘body‘. However, you have to ‘resolve‘ the future eventually by applying a result on ‘resolve‘.

Example:

“‘
(with-fut-resolve
(bt2:make-thread
(lambda ()
(let ((result (do-some-lengthy-calculation)))
(fresolve result)))))
“‘

Package

sento.future.

Source

fcomputation.lisp.

Macro: with-get-handler (&body body)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Macro: with-update-handler (&body body)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Macro: with-waitfor ((wait-time) &body body)

Spawns thread with timeout. Blocks until computation is done, or timeout elapsed.

Package

sento.timeutils.

Source

timeutils.lisp.


6.1.4 Setf expanders

Setf Expander: (setf agent-elt) (index array-agent)
Package

sento.agent.array.

Source

array-agent.lisp.

Reader

agent-elt (function).

Writer

agent-set (function).

Setf Expander: (setf agent-gethash) (key hash-agent)
Package

sento.agent.hash.

Source

hash-agent.lisp.

Reader

agent-gethash (function).

Writer

agent-puthash (function).


6.1.5 Ordinary functions

Function: add-routee (router routee)

Adds a routee/actor to the router.

Package

sento.router.

Source

router.lisp.

Function: agent-clrhash (hash-agent)

Clears the hash-table. See ‘cl:clrhash‘.

Package

sento.agent.hash.

Source

hash-agent.lisp.

Function: agent-delete (item array-agent &rest delete-args)

Deletes item from array. Internally uses ‘delete‘. Returns ‘T‘.

- ‘item‘: the item to delete.
- ‘array-agent‘: the array agent instance.
- ‘delete-args‘: any arguments passed on to ‘delete‘.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: agent-doarray (fun array-agent)

’Do’ arbitrary atomic operation on the array.

- ‘fun‘: is a 1-arity function taking the array. This function can operate on the array without interference from other threads. The result of this function must be an array which will be the new agent state. - ‘array-agent‘: is the ‘array-agent‘ instance.

The result of ‘agent-doarray‘ is ‘T‘.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: agent-dohash (fun hash-agent)

’Do’ arbitrary atomic operation on the hash-table.

- ‘fun‘: is a 1-arity function taking the hash-table. This function can operate on the hash-table without interference from other threads. The result of this function must be a hash-table. - ‘hash-agent‘: is the ‘hash-agent‘ instance.

The result of ‘agent-dohash‘ is ‘T‘.

Package

sento.agent.hash.

Source

hash-agent.lisp.

Function: agent-elt (index array-agent)

Retrieves the value of the specified index of the array. ‘agent-elt‘ allows ‘setf‘ing like:

“‘
(setf (agent-elt 0 cut) 11)
“‘

- ‘index‘: the index to retrieve.
- ‘array-agent‘: the array agent instance.

In case of error ‘agent-elt‘ returns the error condition that ‘elt‘ raises.

The ‘setf‘ functionality will call ‘err-fun‘ on error if it has been configured.

Package

sento.agent.array.

Source

array-agent.lisp.

Setf expander for this function

(setf agent-elt).

Function: agent-get (agent get-fun)

Gets the current state of the ‘agent‘.
‘get-fun‘ must accept one parameter. That is the current-state of the ‘agent‘. To return the current state ‘get-fun‘ may be just the ‘identity‘ function.

Package

sento.agent.

Source

agent.lisp.

Function: agent-get-quick (agent get-fun)

Gets the current state with bypassing the messaging.
If you need consistent results this function should not be used.

Package

sento.agent.

Source

agent.lisp.

Function: agent-gethash (key hash-agent)

Retrieves value from hash-table, or ‘nil‘ if it doesn’t exist.
See ‘cl:gethash‘ for more info.

This supports setting a hash using ‘setf‘ in the same way as with ‘cl:hash-table‘.

Returns any raised condition or the value from ‘gethash‘.

Package

sento.agent.hash.

Source

hash-agent.lisp.

Setf expander for this function

(setf agent-gethash).

Function: agent-pop (array-agent)

Pops from array and returns the popped value. Internally uses ‘vector-pop‘, so the array must have a ‘fill-pointer‘. In case of error from using ‘vector-pop‘ the condition is returned.

- ‘array-agent‘: the array agent instance.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: agent-push (item array-agent)

Pushes a value to the array/vector. Internally uses ‘vector-push-extend‘, so the array must have a ‘fill-pointer‘.

‘item‘: item to push.
‘array-agent‘: the array agent instance.

On error it will call ‘err-fun‘ with the raised condition, if ‘err-fun‘ has been configured.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: agent-push-and-getidx (item array-agent)

Pushes ‘item‘ to the array. This function is similar to ‘agent-push‘ but returns the index of the pushed value similar as ‘vector-push‘ does. Therefore it is based on the somewhat slower ‘ask-s‘ actor pattern. So if you don’t care about the new index of the pushed item use ‘agent-push‘ instead. But this one is able to immediately return error conditions that may occur on ‘vector-push‘.

- ‘item‘: item to push.
- ‘array-agent‘: the array agent instance.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: agent-remhash (key hash-agent)

Delete a hash-table entry. See ‘cl:remhash‘. Returns ‘T‘ if entry existed, ‘NIL‘ otherwise.

Package

sento.agent.hash.

Source

hash-agent.lisp.

Function: agent-stop (agent)

Stops the message handling of the agent.

Package

sento.agent.

Source

agent.lisp.

Function: agent-update (agent update-fun)

Updates the ‘agent‘ state.

‘update-fun‘ must accept one parameter. That is the current state of the ‘agent‘. The return value of ‘update-fun‘ will be taken as the new state of the ‘agent‘.

Package

sento.agent.

Source

agent.lisp.

Function: agent-update-and-get (agent update-fun)

Updates the ‘agent‘ state.

‘update-fun‘ must accept one parameter. That is the current state of the ‘agent‘. The return value of ‘update-fun‘ will be taken as the new state of the ‘agent‘. This function makes the update and returns the new value.

Package

sento.agent.

Source

agent.lisp.

Function: assert-cond (assert-fun max-time &optional sleep-time)

Obsolete, use ‘await-cond’ instead.

Package

sento.miscutils.

Source

miscutils.lisp.

Function: call (actor-cell message &key time-out)

Send a message to a actor-cell instance and wait for a result.
Specify a timeout in seconds if you require a result within a certain period of time.
Be aware though that this is a resource intensive wait based on a waiting thread.
The result can be of different types.
Normal result: the last expression of ‘handle-call‘ (or ‘receive‘ in ‘act:actor‘) implementation. Error result: ‘(cons :handler-error <condition>)’
In case of time-out the error condition is a bt2:timeout.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: cancel (wheel-timer sig)

Cancels a timer with the given signature ‘sig‘.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Function: cast (actor-cell message &optional sender)

Sends a message to a actor-cell asynchronously. There is no result. If a ‘sender’ is specified the result will be sent to the sender.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: collect-backtrace (condition)
Package

sento.miscutils.

Source

miscutils.lisp.

Function: complete-p (future)

Is ‘future‘ completed? Returns either ‘t‘ or ‘nil‘.

Package

sento.future.

Source

fcomputation.lisp.

Function: config-from (config-string)

Parses the given config-string, represented by common lisp s-expressions. The config is composed of plists in a hierarchy.

This function parses (run through ‘cl:read‘) the given config string. The config string can be generated by:

“‘
(let ((*print-case* :downcase))
(prin1-to-string ’(defconfig
(:foo 1
:bar 2))))
“‘
Or just be given by reading from a file.
Notice the ’config’ s-expr must start with the root ‘car‘ ’defconfig’.

Package

sento.config.

Source

config.lisp.

Function: error-p (future)

Is ‘future‘ errored? Returns either ‘t‘ or ‘nil‘.

Package

sento.future.

Source

fcomputation.lisp.

Function: fawait (fut &key timeout sleep-time)

Wait for the future ‘FUT‘ to be ready. Returns ‘VALUES‘ with ‘result’ of the future and ‘FUT’.
If the future is not ready after ‘TIMEOUT‘ seconds the ‘result’ is ‘NIL’.
The ‘SLEEP-TIME‘ parameter specifies the time to sleep between checks of the future.
The wait is based on attempts. To be accurate in terms of ‘TIMEOUT‘ the ‘SLEEP-TIME‘ should be a divisor of ‘TIMEOUT‘. Disclaimer: naive implementation. There may be better solutions.

Package

sento.future.

Source

fcomputation.lisp.

Function: filter (fun lst)
Package

sento.miscutils.

Source

miscutils.lisp.

Function: fresult (future)

Get the computation result. If not yet available ‘:not-ready‘ is returned.

Package

sento.future.

Source

fcomputation.lisp.

Function: futurep (object)

Checks if type of ‘object‘ is ‘future‘.

Package

sento.future.

Source

fcomputation.lisp.

Function: get-current-millis ()
Package

sento.timeutils.

Source

timeutils.lisp.

Function: has-stashed-messages-p (stashing)

Are there any stashed messages?

Package

sento.stash.

Source

stash.lisp.

Function: make-actor-context (actor-system &optional id)

Creates an ‘actor-context‘. Requires a reference to ‘actor-system‘ ‘id‘ is an optional value that can identify the ‘actor-context‘. Creating an actor-context manually is usually not needed.
An ‘asys:actor-system‘ implements the ‘actor-context‘ protocol. An ‘act:actor‘ contains an ‘actor-context‘.

Package

sento.actor-context.

Source

actor-context.lisp.

Function: make-actor-system (&optional config)

Creates an ‘actor-system‘.

Allows to provide an optional configuration. See ‘asys:*default-config*‘. If no config is provided the default config is used.
Is a config provided then it is merged with the default config. Config options in the existing config override the default config. See ‘config:config-from‘.

Package

sento.actor-system.

Source

actor-system.lisp.

Function: make-agent (state-fun &optional actor-context dispatcher-id)

Makes a new ‘agent‘ instance.

- ‘state-fun‘ is a function that takes no parameter and provides the initial state of the ‘agent‘ as return value.
- ‘actor-context‘: optionally specify an ‘asys:actor-system‘ as ‘ac:actor-context‘. If specified the agent will be registered in the system and destroyed with it should the ‘asys:actor-system‘ be destroyed. In addition the agent will use the systems shared message dispatcher and will _not_ create it’s own. - ‘dispatcher-id‘: the dispatcher is configurable. Default is ‘:shared‘. But you may use also ‘:pinned‘ or a custom configured one. Be aware that ‘:shared‘ of a custom dispatcher only works if an ‘actor-context‘ was specified.

Package

sento.agent.

Source

agent.lisp.

Function: make-array-agent (context &key initial-array error-fun dispatcher-id)

Creates an agent that wraps a CL array/vector.

- ‘context‘: something implementing ‘ac:actor-context‘ protocol like ‘asys:actor-system‘. Specifying ‘nil‘ here creates an agent outside of an actor system. The user has to take care of that himself. - ‘initial-array‘: specify an initial array/vector.
- ‘error-fun‘: a 1-arrity function taking a condition that was raised.
Use this to get notified of error when using the update functions of the agent.
- ‘dispatcher-id‘: a dispatcher. defaults to ‘:shared‘.

Package

sento.agent.array.

Source

array-agent.lisp.

Function: make-atomic-integer (&key value)
Package

sento.atomic.

Source

atomic.lisp.

Function: make-atomic-reference (&key value)
Package

sento.atomic.

Source

atomic.lisp.

Function: make-dispatcher (actor-context identifier &rest config)

Default constructor.
This creates a ‘disp:shared-dispatcher‘ with the given dispatcher config, see ‘asys:*default-config*‘. Each worker is based on a ‘:pinned‘ actor meaning that it has its own thread.
Specify an ‘ac:actor-context‘ where actors needed in the dispatcher are created in.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Function: make-dispatcher-worker (num actor-context dispatcher-ident)

Constructor for creating a worker.
‘num‘ only has the purpose to give the worker a name which includes a number. ‘dispatcher-ident is the dispatcher identifier.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Function: make-eventstream (actor-context &rest config)

Creating an eventstream is done by the ‘asys:actor-system‘ which is then available system wide.
But in theory it can be created individually by just passing an ‘ac:actor-context‘ (though I don’t know what would be the reason to create an eventstream for the context of a single actor. Maybe to address only a certain hierarchy in the actor tree.)

- ‘actor-context‘: the ‘ac:actor-context‘ where the eventstream actor should be created in.
- ‘config‘: is a plist with the ‘:dispatcher-id‘ key and a dispatcher id as value. Defaults to ‘:shared‘. This dispatcher type should be used by the actor.

Package

sento.eventstream.

Source

eventstream.lisp.

Function: make-fsm (actor-context &key name start-with event-handling type dispatcher-id)

‘make-fsm‘ Function

Creates a finite state machine (FSM) within the given ‘actor-context‘.

**Parameters**

- ‘actor-context‘: Can be an actor, an actor-context (class), or an actor-system in which this FSM is created.

- ‘name‘: A string representing the name of the FSM. Must be a string.

- ‘start-with‘: A cons cell where the car is the initial state and the cdr is the initial data for the FSM. Must be a cons.

- ‘event-handling‘: An optional function for handling events. It can be ‘nil‘ if not provided. Must be either a function or ‘nil‘. If omitted, the FSM will effectively do nothing. The function body should be constructed using the provided FSM-related macros such as ‘on-event‘ and ‘on-transition‘.

- ‘type‘: The type of actor to create. Defaults to ‘’fsm‘.

- ‘dispatcher-id‘: Identifies the dispatcher for the FSM. Defaults to ‘:shared‘.

**Description**

The ‘make-fsm‘ function initializes an FSM actor with a specified initial state and associated data. The FSM’s behavior is defined by the ‘event-handling‘ function, which processes events if provided. This function should utilize the provided macros like ‘on-event‘ and ‘on-transition‘ to structure its body, enabling robust event handling and state transition management. Without this function, the FSM will not perform any actions.

This function configures the FSM within the given ‘actor-context‘, ensuring it is properly set up according to the parameters specified through the ‘ac:actor-of‘ function.

Package

sento.fsm.

Source

fsm.lisp.

Function: make-future (execute-fun)

Creates a future. ‘execute-fun‘ is the lambda that is executed when the future is created.
‘execute-fun‘ takes a parameter which is the ‘execute-fun‘ funtion. ‘execute-fun‘ function
takes the ‘promise‘ as parameter which is the computed value. Calling ‘execute-fun‘ with the promise
will fulfill the ‘future‘.
Manually calling ‘execute-fun‘ to fulfill the ‘future‘ is in contrast to just fulfill the ‘future‘ from a return value. The benefit of the ‘execute-fun‘ is flexibility. In a multi-threaded environment ‘execute-fun‘ could spawn a thread, in which case ‘execute-fun‘ would return immediately but no promise-value can be given at that time. The ‘execute-fun‘ can be called from a thread and provide the promise.

Create a future with:

“‘elisp
(make-future (lambda (execute-fun)
(let ((promise (delayed-computation)))
(bt2:make-thread (lambda ()
(sleep 0.5)
(funcall execute-fun promise))))))
“‘

Package

sento.future.

Source

fcomputation.lisp.

Function: make-hash-agent (context &key initial-hash-table error-fun dispatcher-id)

Creates an agent that wraps a CL hash-table.

- ‘context‘: something implementing ‘ac:actor-context‘ protocol like ‘asys:actor-system‘. Specifying ‘nil‘ here creates an agent outside of an actor system. The user has to take care of that himself. - ‘initial-hash-table‘: specify an initial hash-table.
- ‘error-fun‘: a 1-arrity function taking a condition that was raised.
Use this to get notified of error when using the update functions of the agent.
- ‘dispatcher-id‘: a dispatcher. defaults to ‘:shared‘.

Package

sento.agent.hash.

Source

hash-agent.lisp.

Function: make-model (&key object err-fun)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Function: make-router (&key strategy routees)

Default constructor of router.
Built-in strategies: ‘:random‘, ‘:round-robin‘.
Specify your own strategy by providing a function that takes a ‘fixnum‘ as parameter which represents the number of routees and returns a ‘fixnum‘ that represents the index of the routee to choose.

Specify ‘routees‘ if you know them upfront.

Package

sento.router.

Source

router.lisp.

Function: make-timer (delay run-fun)
Package

sento.timeutils.

Source

timeutils.lisp.

Function: make-wheel-timer (&rest config)

Creates a new ‘wt:wheel-timer‘.

‘config‘ is a parameter for a list of key parameters including:

- ‘:resolution‘ the timer time resolution in milliseconds. 100 milliseconds is a good default.
- ‘:max-size‘ the number of timer slots this wheel should have.

Note that an ‘asys:actor-system‘ includes an instance as ‘asys:scheduler‘ that can be used within actors. But you can also create your own instance.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Function: merge-config (config fallback-config)

Merges config.
‘config‘ specifies a config that overrides what exists in ‘fallback-config‘.
‘fallback-config‘ is a default. If something doesn’t exist in ‘config‘ it is taken from ‘fallback-config‘. Both ‘config‘ and ‘fallback-config‘ must be plists, or a ’config’ that was the output of ‘config-from‘.

Package

sento.config.

Source

config.lisp.

Function: mkstr (&rest args)

Converts all parameters to string and concatenates them.

Package

sento.miscutils.

Source

miscutils.lisp.

Reader: model-err-fun (instance)
Writer: (setf model-err-fun) (instance)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Target Slot

err-fun.

Reader: model-object (instance)
Writer: (setf model-object) (instance)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Target Slot

object.

Function: register-dispatcher (system dispatcher)

Registers a dispatcher to the actor-system.

- ‘system‘: the actor-system
- ‘dispatcher‘: the dispatcher instance.

Package

sento.actor-system.

Source

actor-system.lisp.

Function: register-new-dispatcher (system dispatcher-id &key workers strategy)

Makes and registers a new dispatcher.

- ‘system‘: the actor-system
- ‘dispatcher-id‘: the dispatcher identifier. Usually a global symbol like ‘:foo‘ - ‘:workers‘: key argument for the number of workers.
- ‘:strategy‘: key argument for the dispatcher strategy (:random or :round-robin)

Package

sento.actor-system.

Source

actor-system.lisp.

Function: reply (msg &optional sender)

Replies to a sender. Sender must exist.
Use this from within receive function to reply to a sender.

Package

sento.actor.

Source

actor.lisp.

Function: retrieve-keys (config)

Retrieves all section keys

Package

sento.config.

Source

config.lisp.

Function: retrieve-section (config section)

Retrieves the given named section which should be a (global) ‘symbol‘ (a key). A section usually is a plist with additional configs or sub sections.
This function looks only in the root hierarchy of the given config.

Package

sento.config.

Source

config.lisp.

Function: retrieve-value (section key)

Retrieves the value for the given key and section.

Package

sento.config.

Source

config.lisp.

Function: routees (router)

Returns the routees as list.

Package

sento.router.

Source

router.lisp.

Function: running-p (actor-cell)

Returns true if this server is running. ‘nil‘ otherwise.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: schedule-once (wheel-timer delay timer-fun &key sig reuse-sig)

Schedule a function execution once:

- ‘wheel-timer‘ is the ‘wt:wheel-timer‘ instance.
- ‘delay‘ is the number of seconds (float) delay when ‘timer-fun‘ should be executed.
- ‘timer-fun‘ is a 0-arity function that is executed after ‘delay‘. BEWARE: the function is executed in the timer thread. Make sure that you off-load long running tasks to other threads, or to a custom dispatcher (i.e. ‘tasks‘). - ‘sig‘ is an optional symbol or string that is used to identify the timer and is used for ‘cancel‘.
- ‘reuse-sig‘ is a boolean that indicates whether the signature should be cleaned up after the timer has been executed.

Returns: signature (symbol) that represents the timer and can be used to cancel the timer.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Function: schedule-recurring (wheel-timer initial-delay delay timer-fun &optional sig)

Schedule a recurring function execution:

- ‘wheel-timer‘ is the ‘wt:wheel-timer‘ instance.
- ‘initial-delay‘ is the number of seconds (float) delay when ‘timer-fun‘ is executed the first time.
- ‘delay‘ is the number of seconds (float) delay when ‘timer-fun‘ should be executed.
- ‘timer-fun‘ is a 0-arity function that is executed after ‘delay‘. BEWARE: the function is executed in the timer thread. Make sure that you off-load long running tasks to other threads, or to a custom dispatcher (i.e. ‘tasks‘). - ‘sig‘ is an optional symbol or string that is used to identify the timer and is used for ‘cancel-recurring‘.

Returns the signature that was either passed in via ‘sig‘ or a generated one.
The signature can be used to cancel the timer via ‘cancel-recurring‘.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Function: shutdown-wheel-timer (wheel-timer)

Shuts down the wheel timer and free resources.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Function: stash (msg)

Stash ‘msg‘ for later unstash.
On stashing a message the actor should respond with: ‘(cons :no-reply state)‘ to avoid returning a response to sender (if given).

This function is expected to be run from within ’receive’ function.

Package

sento.stash.

Source

stash.lisp.

Function: stop (router)

Stops all routees.

Package

sento.router.

Source

router.lisp.

Function: task-async (fun &key on-complete-fun)

‘task-async‘ schedules the function ‘fun‘ for asynchronous execution.
‘fun‘ must be a 0-arity function.
‘on-complete-fun‘ is a 1-arity completion handler function. When called the result is delivered.
The completion handler function parameter may also be a ‘(cons :handler-error condition)‘ construct in case an error happened within the message handling.

Be aware about the execution of the completion function:
The completion function is, by a very high chance, executed by the thread that executed ‘fun‘ function.
Only in very rare cases it could be possible that the completion function is executed by the caller of ‘task-async‘. See ‘future:fcompleted‘ for more info.

Using ‘task-async‘ provides two alternatives:

- together with ‘task-await‘
- or with completion handler

In fact it is possible to call ‘task-await‘ as well, but then you probably don’t need a completion handler.
Using the completion handler makes the processing complete asynchronous.

The result of ‘task-async‘ is a ‘task‘.
Store this ‘task‘ for a call to ‘task-async‘ (even with or without using ‘on-complete-fun‘).
When _not_ using ‘on-complete-fun‘ users must call either ‘task-await‘ or ‘task-shutdown‘ for the task to be cleaned up.
When using ‘on-complete-fun‘ this is done for you.

Example:

“‘elisp
;; create actor-system
(defparameter *sys* (make-actor-system))

(with-context (*sys*)
(let ((x (task-async (lambda () (some bigger computation))))
(y 1))
(+ (task-await x) y)))

;; use-case with ‘on-complete-fun‘
(defun my-task-completion (result)
(do-something-with result))

(with-context (*sys*)
(task-async (lambda () (some-bigger-computation))
:on-complete-fun #’my-task-completion))
“‘

Package

sento.tasks.

Source

tasks.lisp.

Function: task-async-stream (fun lst)

‘task-async-stream‘ concurrently applies ‘fun‘ on all elements of ‘lst‘.
‘fun‘ must be a one-arity function taking an element of ‘lst‘.

The concurrency depends on the number of available ‘:shared‘ dispatcher workers.
Each element of ‘lst‘ is processed by a worker of the ‘asys:actor-system‘s ‘:shared‘ dispatcher. If all workers are busy then the computation of ‘fun‘ is queued.

Example:

“‘elisp
;; create actor-system
(defparameter *sys* (make-actor-system))

(with-context (*sys*)
(->>
’(1 2 3 4 5)
(task-async-stream #’1+)
(reduce #’+)))

=> 20 (5 bits, #x14, #o24, #b10100)
“‘

Package

sento.tasks.

Source

tasks.lisp.

Function: task-await (task &optional time-out)

‘task-await‘ waits (by blocking) until a result has been generated for a previous ‘task-async‘ by passing the ‘task‘ result of ‘task-async‘ to ‘task-await‘. Specify ‘time-out‘ in seconds. If ‘task-await‘ times out a ‘(cons :handler-error ’ask-timeout)‘ will be returned.
‘task-await‘ also stops the ‘task‘ that is the result of ‘task-async‘, so it is of no further use.

Package

sento.tasks.

Source

tasks.lisp.

Function: task-shutdown (task)

‘task-shutdown‘ shuts down a task in order to clean up resources.

Package

sento.tasks.

Source

tasks.lisp.

Function: task-start (fun)

‘task-start‘ runs the given function ‘fun‘ asynchronously.
‘fun‘ must be a 0-arity function.
Use this if you don’t care about any response or result, i.e. for I/O side-effects.
It returns ‘(values :ok <task>)‘. ‘<task> is in fact an actor given back as reference.
The task is automatically stopped and removed from the context and will not be able to handle requests.

Package

sento.tasks.

Source

tasks.lisp.

Function: task-yield (fun &optional time-out)

‘task-yield‘ runs the given function ‘fun‘ by blocking and waiting for a response from the ‘task‘, or until the given timeout was elapsed. ‘fun‘ must be a 0-arity function.

A normal response from the actor is passed back as the response value.
If the timeout elapsed the response is: ‘(values :handler-error miscutils:ask-timeout)‘.

Example:

“‘elisp
;; create actor-system
(defparameter *sys* (make-actor-system))

(with-context (*sys*)
(task-yield (lambda () (+ 1 1))))

=> 2 (2 bits, #x2, #o2, #b10)
“‘

Package

sento.tasks.

Source

tasks.lisp.

Function: unstash-all ()

Unstash all messages.
Messages are re-submitted to the actor in the order they were stashed.
Resubmitting means they are added to the end of the queue like any ordinary message would.

This function is expected to be run from within ’receive’ function.

Package

sento.stash.

Source

stash.lisp.

Function: wait-cond (cond-fun &optional sleep-time max-time)

Waits until ‘cond-fun’ is not ‘nil’ or ‘max-time’ elapsed. This blocks the calling thread.

Package

sento.timeutils.

Source

timeutils.lisp.


6.1.6 Generic functions

Generic Function: ! (actor message &optional sender)

Sends a message to the ‘actor‘. ‘tell‘ is asynchronous.
‘tell‘ does not expect a result. If a ‘sender‘ is specified the receiver will be able to send a response.

Alternatively to the ‘tell‘ function one can equally use the ‘!‘ function designator.

Package

sento.actor.

Alias for

tell.

Generic Function: ? (actor message &key time-out)

Sends a message to the ‘actor‘. A ‘future‘ is returned.
Specify ‘timeout‘ if a message is to be expected after a certain time.
An ‘:handler-error‘ with ‘timeout‘ condition will be returned is the call timed out.

An ‘ask‘ is similar to a ‘ask-s‘ in that the caller gets back a result
but it doesn’t have to actively wait for it. Instead a ‘future‘ wraps the result.
However, the internal message handling is based on ‘tell‘.
How this works is that the message to the target ‘actor‘ is not ’sent’ using the callers thread but instead an anonymous ‘actor‘ is started behind the scenes. This anonymous actor can weit for a response from the target actor. The response then fulfills the future.

Alternatively to the ‘ask‘ function one can equally use the ‘?‘ function designator.

Package

sento.actor.

Alias for

ask.

Generic Function: actor-of (context &key receive init destroy dispatcher state type name queue-size &allow-other-keys)

Interface for creating an actor.

**!!! Attention:** this factory function wraps the ‘act:make-actor‘ functionality to something more simple to use.
Using this function there is no need to use both ‘act:make-actor‘.

‘context‘ is either an ‘asys:actor-system‘, an ‘ac:actor-context‘, or an ‘act:actor‘ (any type of actor).
The new actor is created in the given context.

- ‘:receive‘ is required and must be a 1-arity function where the arguments is received message object.
The function can be just a lambda like ‘(lambda (msg) ...)‘.
- ‘:init‘: is an optional initialization function with one argument: the actor instance (self).
This represents a ’start’ hook that is called after the actor was fully initialized.
- ‘:destroy‘: is an optional destroy function also with the actor instance as argument.
This function allows to unsubsribe from event-stream or such.
- ‘:state‘ key can be used to initialize with a state.
- ‘:dispatcher‘ key can be used to define the message dispatcher manually.
Options that are available by default are ‘:shared‘ (default) and ‘:pinned‘. When you defined a custom dispatcher it can be specified here. - ‘:type‘ can specify a custom actor class. See ‘act:make-actor‘ for more info.
- ‘:name‘ to set a specific name to the actor, otherwise a random name will be used.

Additional options:

- ‘:queue-size‘ limits the message-box’s size. By default, it is unbounded.

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: actor-of ((system actor-system) &rest rest &key receive init destroy dispatcher state type name &allow-other-keys)

See ‘ac:actor-of‘

Source

actor-system.lisp.

Method: actor-of ((context actor-context) &rest rest &key receive init destroy dispatcher state type name queue-size &allow-other-keys)

See ‘ac:actor-of‘.

Source

actor-context.lisp.

Method: actor-of ((actor actor) &rest rest &key receive init destroy dispatcher state type name)

‘ac:actor-context‘ protocol implementation

Source

actor.lisp.

Generic Function: after-stop (actor)

Generic function definition that is called after the actor has stopped, that is after the message box is stopped. No more messages are being processed.

Under normal circumstances one would provide an ‘destroy‘ function at construction of the actor instead (see above). This generic function is more meant to create specialized actors by providing different implementations.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: after-stop ((self actor))
Source

actor.lisp.

Generic Function: all-actors (context)

Retrieves all actors of this context as a list

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: all-actors ((self actor-system))

See ‘ac:all-actors‘

Source

actor-system.lisp.

Method: all-actors ((context actor-context))

See ‘ac:all-actors‘

Source

actor-context.lisp.

Method: all-actors ((actor actor))

‘ac:actor-context‘ protocol implementation.

Source

actor.lisp.

Generic Function: ask (actor message &key time-out)

Sends a message to the ‘actor‘. A ‘future‘ is returned.
Specify ‘timeout‘ if a message is to be expected after a certain time.
An ‘:handler-error‘ with ‘timeout‘ condition will be returned is the call timed out.

An ‘ask‘ is similar to a ‘ask-s‘ in that the caller gets back a result
but it doesn’t have to actively wait for it. Instead a ‘future‘ wraps the result.
However, the internal message handling is based on ‘tell‘.
How this works is that the message to the target ‘actor‘ is not ’sent’ using the callers thread but instead an anonymous ‘actor‘ is started behind the scenes. This anonymous actor can weit for a response from the target actor. The response then fulfills the future.

Alternatively to the ‘ask‘ function one can equally use the ‘?‘ function designator.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: ask ((self router) message &key time-out)

Posts the message to one routee. The routee is chosen from the router ‘strategy‘. Otherwise see: ‘act:ask‘.

Source

router.lisp.

Method: ask ((self actor) message &key time-out)
Source

actor.lisp.

Generic Function: ask-s (actor message &key time-out)

Sends a message to the ‘actor‘. ‘ask-s‘ is synchronous and waits for a result.
Specify ‘timeout‘ if a message is to be expected after a certain time.
An ‘:handler-error‘ with ‘timeout‘ condition will be returned if the call timed out.

‘ask-s‘ assumes, no matter if ‘ask-s‘ is issued from outside or inside an actor, that the response is delivered back to the caller. That’s why ‘ask-s‘ does block the execution until the result is available. The ‘receive‘ function return value will be used as the result of ‘receive‘.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: ask-s ((self router) message &key time-out)

Posts the message to one routee. The routee is chosen from the router ‘strategy‘. Otherwise see: ‘act:ask-s‘.

Source

router.lisp.

Method: ask-s ((self actor) message &key time-out)
Source

actor.lisp.

Generic Function: atomic-cas (atomic expected new)

Set ‘new‘ value. The current value must be ‘extented‘.

Package

sento.atomic.

Source

atomic-api.lisp.

Methods
Method: atomic-cas ((int atomic-integer) expected new)
Source

atomic.lisp.

Method: atomic-cas ((ref atomic-reference) old new)

Synonym for COMPARE-AND-SWAP.
Atomically store NEW in the cell slot of REF if OLD is eq to the current value of cell slot. Return non-NIL if this atomic operaion succeeded, or return NIL if it failed.

Source

atomic.lisp.

Generic Function: atomic-get (atomic)

Retrieve value from atomic object.

Package

sento.atomic.

Source

atomic-api.lisp.

Methods
Method: atomic-get ((int atomic-integer))
Source

atomic.lisp.

Method: atomic-get ((ref atomic-reference))
Source

atomic.lisp.

Generic Function: atomic-swap (atomic fn &rest args)

Update the the atomic object to the value returned by calling function ‘fn‘ with the previous value of the atomic object and ‘args‘.

Package

sento.atomic.

Source

atomic-api.lisp.

Methods
Method: atomic-swap ((int atomic-integer) fn &rest args)
Source

atomic.lisp.

Method: atomic-swap ((ref atomic-reference) fn &rest args)

Updates the cell value of REF atomically to the value returned by calling function FN with ARGS and the previous cell value of REF. The first argument of FN should be the previous cell value of REF.

Source

atomic.lisp.

Generic Function: become (new-behavior)

Changes the receive of the actor to the given ‘new-behavior‘ function.
The ‘new-behavior‘ function must accept 3 parameters: the actor instance, the message and the current state. This function should be called from within the behavior receive function.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: become (new-behavior)
Source

actor.lisp.

Generic Reader: cause (condition)
Package

sento.timeutils.

Methods
Reader Method: cause ((condition ask-timeout))
Source

timeutils.lisp.

Target Slot

cause.

Generic Reader: context (actor)

This is the ‘actor-context‘ every actor is composed of.
When the actor is created from scratch it has no ‘actor-context‘.
When created through the ‘actor-context‘s, or system’s ‘actor-of‘ function an ‘actor-context‘ will be set.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Reader Method: context ((actor actor))

The ‘ac:actor-context‘

Target Slot

context.

Generic Writer: (setf context) (object)
Package

sento.actor.

Methods
Writer Method: (setf context) ((actor actor))

The ‘ac:actor-context‘

Source

actor-api.lisp.

Target Slot

context.

Generic Function: dispatch (dispatcher dispatcher-exec-fun)

Dispatches a function (‘dispatch-exec-fun‘) to a worker of the dispatcher to execute there. ‘dispatch‘ does a ‘ask-s‘ to a ‘dispatcher‘ worker, which means this call will block. The parameter ‘dispatcher-exec-fun‘ if of the form: ‘(list (function <something>))‘

Package

sento.dispatcher.

Source

dispatcher-api.lisp.

Methods
Method: dispatch ((self shared-dispatcher) dispatch-exec-fun-args)
Source

dispatcher.lisp.

Generic Function: dispatch-async (dispatcher dispatcher-exec-fun)

Dispatches a function to a worker of the dispatcher to execute there. ‘dispatch-async‘ does a ‘tell‘ to a ‘dispatcher‘ worker and is asynchronous.

Package

sento.dispatcher.

Source

dispatcher-api.lisp.

Methods
Method: dispatch-async ((self shared-dispatcher) dispatch-exec-fun-args)
Source

dispatcher.lisp.

Generic Reader: dispatchers (object)
Package

sento.actor-system.

Methods
Reader Method: dispatchers ((actor-system actor-system))

Internal API: contains a list of available message dispatchers.

Source

actor-system.lisp.

Target Slot

dispatchers.

Generic Function: emptyq-p (queue-base)

Returns ‘T’ if there is no element in the queue.

Package

sento.queue.

Source

queue.lisp.

Methods
Method: emptyq-p ((self queue-unbounded))
Source

queue-locked.lisp.

Method: emptyq-p ((self queue-bounded))
Generic Reader: evstream (object)
Package

sento.actor-system.

Methods
Reader Method: evstream ((actor-system actor-system))

The system event stream. See ‘ev:eventstream‘ for more info.

Source

actor-system.lisp.

Target Slot

eventstream.

Generic Function: find-actors (context path &key test key)

Returns actors to be found by the criteria of:

- ‘context‘: an ‘AC:ACTOR-CONTEXT‘, or an ‘ACT:ACTOR‘ or an ‘ASYS:ACTOR-SYSTEM‘ as all three implement ‘find-actors‘.
- ‘path‘: a path designator to be found. This can be just an actor name, like ’foo’, then ‘find-actors‘ will only look in the given context for the actor. It can also be: ’foo/bar’, a relative path, in which case ‘find-actors‘ will traverse the path (here ’bar’ is a child of ’foo’) to the last context and will try to find the actor by name there, ’bar’ in this case. Also possible is a root path like ’/user/foo/bar’ which will start traversing contexts started from the root context, which is the actor-system. - ‘test‘: a 2-arity test function where the 1st argument is the ‘path‘, the 2nd is the a result of the ‘key‘ function (which defaults to ‘ACT-CELL:NAME‘, so the name of the actor). The default function for ‘test‘ is ‘STRING=‘. However, in case of a multi-subpath ‘path‘ both ‘test‘ and ‘key‘ only apply to the last path component, which designates the actor name to be found.
- ‘key‘: a 1-arity function applied on an actor instance. Defaults to ‘ACT-CELL:NAME‘.

Depending on ‘test‘ function the last path component can be used as a wildcard when using a ‘test‘ function like ‘STR:STARTS-WITH-P‘ or ‘STR:CONTAINSP‘ for example.

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: find-actors ((self actor-system) path &key test key)

See ‘ac:find-actors‘

Source

actor-system.lisp.

Method: find-actors ((context actor-context) path &key test key)

See ‘ac:find-actors‘

Source

actor-context.lisp.

Method: find-actors ((actor actor) path &key test key)

‘ac:actor-context‘ protocol implementation.

Source

actor.lisp.

Generic Function: handle-call (actor-cell message)

Handles calls to the server. Must be implemented by subclasses.
The result of the last expression of this function is returned back to the ’caller’. State of the cell can be changed via ‘setf‘ing ‘*state*‘ variable.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Methods
Method: handle-call ((self actor) message)
Source

actor.lisp.

Generic Function: handle-cast (actor-cell message)

Handles casts to the server. Must be implemented by subclasses. State of the cell can be changed via ‘setf‘ing ‘*state*‘ variable.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Methods
Method: handle-cast ((self actor) message)
Source

actor.lisp.

Generic Reader: id (object)
Package

sento.actor-context.

Methods
Reader Method: id ((actor-context actor-context))

The id of this actor-context. Usually a string.

Source

actor-context.lisp.

Target Slot

id.

Generic Reader: identifier (object)
Package

sento.dispatcher.

Methods
Reader Method: identifier ((dispatcher-base dispatcher-base))

Returns the identifier of the dispatcher.

Source

dispatcher.lisp.

Target Slot

identifier.

Generic Function: make-actor (receive &key name state type init destroy &allow-other-keys)

Constructs an ‘actor‘.

Arguments:

- ‘receive‘: message handling function taking one argument, the message.

- ‘name‘: give the actor a name. Must be unique within an ‘ac:actor-context‘.

- ‘type‘: Specify a custom actor class as the ‘:type‘ key. Defaults to ’actor.
Say you have a custom actor ‘custom-actor‘ and want ‘make-actor‘ create an instance of it. Then specify ‘:type ’custom-actor‘ on ‘make-actor‘ function.
If you have additional initializations to make you can do so in ‘initialize-instance‘.

- ‘state‘: initialize an actor with a state. (default is ‘nil‘)

- ‘init‘ and ‘destroy‘: are functions that take one argument, the actor instance. Those hooks are called on (after) initialization and (after) stop respectively.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: make-actor (receive &rest rest &key name state type init destroy &allow-other-keys)
Source

actor.lisp.

Generic Reader: msgbox (object)
Generic Writer: (setf msgbox) (object)
Package

sento.actor-cell.

Methods
Reader Method: msgbox ((actor-cell actor-cell))
Writer Method: (setf msgbox) ((actor-cell actor-cell))

The ‘message-box‘. By default the ‘actor‘/‘actor-cell‘ has no message-box.
When the actor is created through the ‘actor-context‘ of an actor, or the ‘actor-system‘ then it will be populated with a message-box.

Source

actor-cell.lisp.

Target Slot

msgbox.

Generic Reader: name (object)
Package

sento.actor-cell.

Methods
Reader Method: name ((actor-cell actor-cell))

The name of the actor/actor-cell. If no name is specified a default one is applied.

Source

actor-cell.lisp.

Target Slot

name.

Generic Function: notify (context actor notification)

Notify the ‘actor-context‘ about something that happened to an actor. Current exists:

- ‘:stopped‘: this will remove the actor from the context.

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: notify ((context actor-context) actor notification)
Source

actor-context.lisp.

Generic Function: path (actor)

The path of the actor, including the actor itself.
The path denotes a tree which starts at the system context.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: path ((self actor))
Source

actor.lisp.

Generic Function: popq (queue-base)

Pops the first element. Blocks until an element arrives.

Package

sento.queue.

Source

queue.lisp.

Methods
Method: popq ((self queue-unbounded))
Source

queue-locked.lisp.

Method: popq ((self queue-bounded))
Generic Function: pre-start (actor)

Generic function definition called after initialization but before messages are accepted.
An ‘ac:actor-context‘ is available at this point as well as ‘act:*state*‘ variable definition.

Under normal circumstances one would provide an ‘init‘ function at construction of the actor instead (see above). This generic function is more meant to create specialized actors by providing different implementations.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: pre-start ((self actor))
Source

actor.lisp.

Generic Function: publish (eventstream message)

Publish an event/message to the eventstream. Subscribers may receive notification if they registered for the right message pattern.

Package

sento.eventstream.

Source

eventstream-api.lisp.

Methods
Method: publish ((system actor-system) message)

Convenience. Allows to publish to ‘ev:eventstream‘ by just providing the ‘asys:actor-system‘.

Source

actor-system.lisp.

Method: publish ((ev-stream eventstream) message)

Publish to ‘ev:eventstream‘.

Source

eventstream.lisp.

Method: publish ((actor actor) message)

Convenience. Allows to publish to ‘ev:eventstream‘ by just providing the actor.

Source

actor.lisp.

Generic Function: pushq (queue-base element)

Pushes an element to the queue.

Package

sento.queue.

Source

queue.lisp.

Methods
Method: pushq ((self queue-unbounded) element)
Source

queue-locked.lisp.

Method: pushq ((self queue-bounded) element)
Generic Function: queued-count (queue-base)

Returns the number of elements in the queue.

Package

sento.queue.

Source

queue.lisp.

Methods
Method: queued-count ((self queue-bounded))
Generic Reader: scheduler (object)
Package

sento.actor-system.

Methods
Reader Method: scheduler ((actor-system actor-system))

A general purpose scheduler that can be used by actors.
See ‘wt:wheel-timer‘ for more info.

The scheduler defaults to a resolution of 100 milliseconds and a maximum of 500 entries.

It is possible to disable the scheduler, i.e. to safe a thread resource, by setting the ‘:enabled‘ key to ‘:false‘ in the ‘:scheduler‘ section of the configuration.

Source

actor-system.lisp.

Target Slot

scheduler.

Generic Function: shutdown (context &key wait)

Stops all actors in this context.
When the context is an ‘actor-context‘ this still stop the actor context and all its actors. For the ‘actor-system‘ it will stop the whole system with all actors.
Specify ‘wait‘ as ‘T‘ to block until all actors of the context are stopped (default ‘NIL‘).

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: shutdown ((self actor-system) &key wait)

See ‘ac:shutdown‘

Source

actor-system.lisp.

Method: shutdown ((context actor-context) &key wait)

See ‘ac:shutdown‘

Source

actor-context.lisp.

Generic Reader: state (object)
Package

sento.actor-cell.

Methods
Reader Method: state ((actor-cell actor-cell))

The encapsulated state.

Source

actor-cell.lisp.

Target Slot

state.

Generic Function: stop (dispatcher)

Stops the dispatcher. Stops all workers.

Package

sento.dispatcher.

Source

dispatcher-api.lisp.

Methods
Method: stop ((self shared-dispatcher))
Source

dispatcher.lisp.

Generic Function: stop (message-box-base &optional wait)

Stops the message processing.
The message processing is not terminated while a message is still processed. Rather it is a graceful stop by waiting until a message has been processed. Provide ‘wait‘ EQ ‘T‘ to wait until the actor cell is stopped.

Package

sento.messageb.

Source

message-box.lisp.

Methods
Method: stop ((self message-box/dp) &optional wait)

Stop the message processing.
This discards further message processing on queued messages.
The message currently being processed will be processed to the end. The ‘wait‘ flag has no consequence for the ‘dispatcher‘ message-box.

Method: stop ((self message-box/bt) &optional wait)
Method: stop ((self message-box-base) &optional wait)
Generic Function: stop (actor-cell &optional wait)

Stops the actor-cells message processing.
There are the following ways to stop an actor (cell).

1. by calling this function.
The actor will finish processing the current message.
All queued messages will be discarded.
No new messages will be accepted.
‘wait‘: waits until the cell is stopped (only applied to ‘:pinned‘ dispatcher).

2. by sending ‘:terminate‘ to actor.
This is effectively the same as calling ‘stop‘ method.

3. by sending ‘:stop‘ to the actor (cell).
This won’t allow to wait when the actor is stopped, even not with ‘ask-s‘.
The ‘:stop‘ message (symbol) is normally processed by the actors message processing. The actor will not accept more messages.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Methods
Method: stop ((self actor) &optional wait)

If this actor has an ‘actor-context‘, also stop all children.
In any case stop the actor-cell. See ‘actor-cell:stop‘ for more info on stopping.

Source

actor.lisp.

Method: stop ((self actor-cell) &optional wait)
Generic Function: stop (context actor &key wait)

Stops the given actor on the context.
The context may either be an ‘actor-context‘, or an ‘actor-system‘. The actor is then also removed from the context.
Specify ‘wait‘ as ‘T‘ to block until the actor is stopped (default ‘NIL‘).

Package

sento.actor-context.

Source

actor-context-api.lisp.

Methods
Method: stop ((self actor-system) actor &key wait)

See ‘ac:stop‘

Source

actor-system.lisp.

Method: stop ((context actor-context) actor &key wait)

See ‘ac:stop‘

Source

actor-context.lisp.

Generic Reader: strategy-fun (object)
Package

sento.router.

Methods
Reader Method: strategy-fun ((router router))

The router strategy function.
The ‘strategy‘ is a function with a ‘fixnum‘ as input and a ‘fixnum‘ as output. The input represents the number of routees.
The output represents the index of the routee to choose by calling the function.

Source

router.lisp.

Target Slot

strategy-fun.

Generic Function: submit (message-box-base message withreply-p time-out handler-fun-args)

Submit a message to the mailbox to be queued and handled.
‘handler-fun-args‘: list with first element the function designator and rest arguments.

Package

sento.messageb.

Source

message-box.lisp.

Methods
Method: submit ((self message-box/dp) message withreply-p time-out handler-fun-args)

Submitting a message on a multi-threaded ‘dispatcher‘ is different as submitting on a single threaded message-box. On a single threaded message-box the order of message processing is guaranteed even when submitting from multiple threads. On the ‘dispatcher‘ this is not the case. The order cannot be guaranteed when messages are processed by different ‘dispatcher‘ threads. However, we still guarantee a ’single-threadedness’ regarding the state of the actor. This is achieved here by protecting the ‘handler-fun-args‘ execution with a lock.

The ‘time-out‘ with the ’dispatcher mailbox’ assumes that the message received the dispatcher queue
and the handler in a reasonable amount of time, so that the effective time-out applies on the actual
handling of the message on the dispatcher queue thread.

Returns the handler-result if ‘withreply-p’ is eq to ‘T’, otherwise the return is just ‘T’ and is usually ignored.

Method: submit ((self message-box/bt) message withreply-p time-out handler-fun-args)

The ‘handler-fun-args‘ argument must contain a handler function as first list item. It will be apply’ed with the rest of the args when the message was ’popped’ from queue.

Generic Function: subscribe (eventstream subscriber &optional pattern)

Subscribe to the eventstream to receive notifications of certain events or event types.

‘subscriber‘ must be an actor (or agent).

The ‘pattern‘ can be:

- nil: receive all events posted to the eventstream.
- a type, class type: this allows to get notifications when an instance of this type, or class type is posted.
I.e. if you want to listen to all string messages posted to the ev, thewn subscribe to ‘’string‘.
Or if you want to listen to all lists, subscribe with ‘’cons‘.
- a symbol or global symbol: if posted message is a symbol or global symbol then the symbols are compared (‘eq‘).
- a string: in which case an exact string comparison is made for a string message that is posted to the eventstream (‘string=‘).
- a list: if subscription if for a list structure, and the posted message is also a list structure, then a structure comparison (‘equalp‘) is made.

Package

sento.eventstream.

Source

eventstream-api.lisp.

Methods
Method: subscribe ((system actor-system) (subscriber actor) &optional pattern)

Convenience. Allows to subscribe to ‘ev:eventstream‘ by just providing the ‘asys:actor-system‘.

Source

actor-system.lisp.

Method: subscribe ((ev-stream eventstream) (subscriber actor) &optional pattern)

Subscribe to ‘ev:eventstream‘.

Source

eventstream.lisp.

Method: subscribe ((actor actor) (subscriber actor) &optional pattern)

Convenience. Allows to subscribe to ‘ev:eventstream‘ by just providing the actor.

Source

actor.lisp.

Generic Function: system (actor)
Package

sento.actor-context.

Methods
Reader Method: system ((actor-context actor-context))

A reference to the ‘actor-system‘.

Source

actor-context.lisp.

Target Slot

system.

Method: system ((actor actor))

Retrieves the ‘asys:actor-system‘ from actor.

Source

actor.lisp.

Generic Function: tell (actor message &optional sender)

Sends a message to the ‘actor‘. ‘tell‘ is asynchronous.
‘tell‘ does not expect a result. If a ‘sender‘ is specified the receiver will be able to send a response.

Alternatively to the ‘tell‘ function one can equally use the ‘!‘ function designator.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: tell ((self router) message &optional sender)

Posts the message to one routee. The routee is chosen from the router ‘strategy‘. Otherwise see: ‘act:tell‘.

Source

router.lisp.

Method: tell ((self actor) message &optional sender)
Source

actor.lisp.

Generic Function: unbecome ()

Reverts any behavior applied via ‘become‘ back to the default ‘receive‘ function. This function should be called from within the behavior receive function.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: unbecome ()
Source

actor.lisp.

Generic Function: unsubscribe (eventstream unsubscriber)

Unsubscribe from the eventstream. No more events will be received then.

Package

sento.eventstream.

Source

eventstream-api.lisp.

Methods
Method: unsubscribe ((system actor-system) (unsubscriber actor))

Convenience. Allows to unsubscribe to ‘ev:eventstream‘ by just providing the ‘asys:actor-system‘.

Source

actor-system.lisp.

Method: unsubscribe ((ev-stream eventstream) (unsubscriber actor))

Unsubscribe to ‘ev:eventstream‘.

Source

eventstream.lisp.

Method: unsubscribe ((actor actor) (unsubscriber actor))

Convenience. Allows to unsubscribe to ‘ev:eventstream‘ by just providing the actor.

Source

actor.lisp.

Generic Function: unwatch (actor watcher)

Unregisters ‘watcher‘ of ‘actor‘.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: unwatch ((self actor) watcher)
Source

actor.lisp.

Generic Function: watch (actor watcher)

Registers ‘watcher‘ as a watcher of ‘actor‘.
Watching lets the watcher know about lifecycle changes of the actor being watched.
I.e.: when it stopped. The message being sent in this case is: ‘(cons :stopped actor-instance)‘

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: watch ((self actor) watcher)
Source

actor.lisp.

Generic Reader: watchers (actor)

Returns a list of watchers of ‘actor‘.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Reader Method: watchers ((actor actor))

List of watchers of this actor.

Target Slot

watchers.

Generic Function: workers (dispatcher)

Returns the workers of this dispatcher.
But better do not touch them.
Only use the defined interface here to talk to them.

Package

sento.dispatcher.

Source

dispatcher-api.lisp.

Methods
Method: workers ((self shared-dispatcher))
Source

dispatcher.lisp.


6.1.7 Standalone methods

Method: initialize-instance :after ((self shared-dispatcher) &key num-workers strategy)
Source

dispatcher.lisp.

Method: initialize-instance :after ((self queue-bounded) &key)
Source

queue.lisp.

Method: initialize-instance :after ((self message-box/bt) &key)
Source

message-box.lisp.

Method: initialize-instance :after ((self message-box/dp) &key)
Source

message-box.lisp.

Method: initialize-instance :after ((self message-box-base) &key)
Source

message-box.lisp.

Method: initialize-instance :after ((self actor-system) &key)
Source

actor-system.lisp.

Method: initialize-instance :after ((obj actor-cell) &key)
Source

actor-cell.lisp.

Method: print-object ((obj shared-dispatcher) stream)
Source

dispatcher.lisp.

Method: print-object ((obj wheel-timer) stream)
Source

wheel-timer.lisp.

Method: print-object ((obj message-box-base) stream)
Source

message-box.lisp.

Method: print-object ((ref atomic-reference) stream)
Source

atomic.lisp.

Method: print-object ((int atomic-integer) stream)
Source

atomic.lisp.

Method: print-object ((obj future) stream)
Source

fcomputation.lisp.

Method: print-object ((obj actor-system) stream)
Source

actor-system.lisp.

Method: print-object ((obj actor-cell) stream)
Source

actor-cell.lisp.

Method: print-object ((obj actor) stream)
Source

actor.lisp.


6.1.8 Conditions

Condition: actor-name-exists
Package

sento.actor-context.

Source

actor-context-api.lisp.

Direct superclasses

error.

Direct methods

name.

Direct slots
Slot: name
Initargs

:name

Readers

name.

Writers

This slot is read-only.

Condition: ask-timeout
Package

sento.timeutils.

Source

timeutils.lisp.

Direct superclasses

serious-condition.

Direct methods
Direct slots
Slot: wait-time
Initform

(quote nil)

Initargs

:wait-time

Readers

wait-time.

Writers

This slot is read-only.

Slot: cause
Initform

(quote nil)

Initargs

:cause

Readers

cause.

Writers

This slot is read-only.

Condition: queue-full-error
Package

sento.queue.

Source

queue.lisp.

Direct superclasses

error.

Direct methods

queue.

Direct slots
Slot: queue
Initargs

:queue

Readers

queue.

Writers

This slot is read-only.


6.1.9 Structures

Structure: model
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: object
Readers

model-object.

Writers

(setf model-object).

Slot: err-fun
Readers

model-err-fun.

Writers

(setf model-err-fun).


6.1.10 Classes

Class: actor

This is the ‘actor‘ class.

The ‘actor‘ does its message handling using the ‘receive‘ function.

The ‘receive‘ function takes one argument (the message). For backwards compatibility and for convenience it can still be used to provide an immediate return for ‘act:ask-s‘. ‘act:tell‘ and ‘act:ask‘ ignore a return value.

There is asynchronous ‘tell‘, a synchronous ‘ask-s‘ and asynchronous ‘ask‘ which all can be used to send messages to the actor. ‘ask-s‘ provides a synchronous return taken from the ‘receive‘ functions return value. ’ask’ provides a return wrapped in a future. But the actor has to explicitly use ‘*sender*‘ to formulate a response. ‘tell‘ is just fire and forget.

To stop an actors message processing in order to cleanup resouces you should ‘tell‘ (or ‘ask-s‘) the ‘:stop‘ message. It will respond with ‘:stopped‘ (in case of ‘ask(-s)‘).

Package

sento.actor.

Source

actor-api.lisp.

Direct superclasses

actor-cell.

Direct subclasses
Direct methods
Direct slots
Slot: receive

‘receive‘ is a function that has to take 1 parameter:
- ‘msg‘: the received message
The ‘sender‘ of the message (if available) accessible with ‘act:*sender*‘ from within the receive function or a behavior.

Initform

(error "'receive' must be specified!")

Initargs

:receive

Readers

receive.

Writers

This slot is read-only.

Slot: behavior

Behavior function applied via ‘act:become‘ and reverted via ‘act:unbecome‘ ‘act:behavior‘ function takes the same parameters as ‘act:receive‘.

Slot: init-fun

Init hook.
Function is called when actor was initialized. ‘act:context‘ is ready setup at that time. Parameter of the lambda is the actor itself.

Initargs

:init

Slot: destroy-fun

Destroy hook.
Function is called when actor was stopped. Parameter of the lambda is the actor itself.

Initargs

:destroy

Slot: context

The ‘ac:actor-context‘

Readers

context.

Writers

(setf context).

Slot: watchers

List of watchers of this actor.

Initform

(quote nil)

Readers

watchers.

Writers

This slot is read-only.

Class: actor-cell

‘actor-cell‘ is the base of the ‘actor‘.
It encapsulates state and can executes async operations.
State can be changed by ‘setf‘ing ‘*state*‘ special variable from inside ‘receive‘ function, via calling ‘call‘ or ‘cast‘. Where ‘call‘ is waiting for a result and ‘cast‘ does not.
For each ‘call‘ and ‘cast‘ handlers must be implemented by subclasses.

It uses a ‘message-box‘ to processes the received messages.
When the ‘actor‘/‘actor-cell‘ was created ad-hoc (out of the ‘actor-system‘/‘actor-context‘),
it will not have a message-box and can’t process messages.
When the ‘actor‘ is created through the ‘actor-system‘ or ‘actor-context‘,
one can decide what kind of message-box/dispatcher should be used for the new ‘actor‘.

See ‘actor-context‘ ‘actor-of‘ method for more information on this.

To stop an ‘actor‘ message handling and you can send the ‘:stop‘ message
either via ‘call‘ (which will respond with ‘:stopped‘) or ‘cast‘.
This is to cleanup thread resources when the actor is not needed anymore.

Note: the ‘actor-cell‘ uses ‘call‘ and ‘cast‘ functions which translate to ‘ask-s‘ and ‘tell‘ on the ‘actor‘.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Direct subclasses

actor.

Direct methods
Direct slots
Slot: name

The name of the actor/actor-cell. If no name is specified a default one is applied.

Initform

(string (gensym "actor-"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: state

The encapsulated state.

Initargs

:state

Readers

state.

Writers

This slot is read-only.

Slot: internal-state

The internal state of the server.

Initform

(sento.actor-cell::make-actor-cell-state)

Slot: msgbox

The ‘message-box‘. By default the ‘actor‘/‘actor-cell‘ has no message-box.
When the actor is created through the ‘actor-context‘ of an actor, or the ‘actor-system‘ then it will be populated with a message-box.

Readers

msgbox.

Writers

(setf msgbox).

Class: actor-context

‘actor-context‘ deals with creating and maintaining actors.
The ‘actor-system‘ and the ‘actor‘ itself are composed of an ‘actor-context‘.

Package

sento.actor-context.

Source

actor-context.lisp.

Direct methods
Direct slots
Slot: id

The id of this actor-context. Usually a string.

Initargs

:id

Readers

id.

Writers

This slot is read-only.

Slot: actors

A list of actors.
This is internal API. Use ‘all-actors‘ or ‘find-actors‘ instead.

Initform

(sento.atomic:make-atomic-reference :value (quote nil))

Slot: system

A reference to the ‘actor-system‘.

Readers

system.

Writers

This slot is read-only.

Class: actor-system

An ‘actor-system‘ is the opening facility. The first thing you do is to create an ‘actor-system‘ using the main constructor ‘make-actor-system‘. With the ‘actor-system‘ you can create actors via the ‘ac:actor-context‘ protocol function: ‘ac:actor-of‘.

Package

sento.actor-system.

Source

actor-system.lisp.

Direct methods
Direct slots
Slot: dispatchers

Internal API: contains a list of available message dispatchers.

Initform

(quote nil)

Readers

dispatchers.

Writers

This slot is read-only.

Slot: config

Internal API: the actor-system configuration.

Initform

(quote nil)

Readers

config.

Writers

(setf config).

Slot: internal-actor-context

Internal API: an actor context reserved for agents/actors used by the system.

Readers

internal-actor-context.

Writers

This slot is read-only.

Slot: user-actor-context

Internal API: an actor context for agents/actors created by the user.

Readers

user-actor-context.

Writers

This slot is read-only.

Slot: timeout-timer

Internal API: A wheel-timer used for timeouts to make timeouts less resource expensive.
This shouldn’t be used freely. It is used internally by the system to support ‘act:ask‘ timeouts.

Readers

timeout-timer.

Writers

This slot is read-only.

Slot: eventstream

The system event stream. See ‘ev:eventstream‘ for more info.

Readers

evstream.

Writers

This slot is read-only.

Slot: scheduler

A general purpose scheduler that can be used by actors.
See ‘wt:wheel-timer‘ for more info.

The scheduler defaults to a resolution of 100 milliseconds and a maximum of 500 entries.

It is possible to disable the scheduler, i.e. to safe a thread resource, by setting the ‘:enabled‘ key to ‘:false‘ in the ‘:scheduler‘ section of the configuration.

Readers

scheduler.

Writers

This slot is read-only.

Class: agent

Specialized ‘actor‘ class called ‘agent‘.
It is meant primarily to encapsulate state.
To access state it provides ‘agent-get‘ and ‘agent-update‘ to update state. Stop an agent with ‘agent-stop‘ to free resources (threads).

Package

sento.agent.

Source

agent.lisp.

Direct superclasses

actor.

Class: dispatch-worker

Specialized ‘actor‘ used as ‘worker‘ is the message ‘dispatcher‘.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Direct superclasses

actor.

Class: dispatcher-base

A ‘dispatcher‘ contains a pool of ‘actors‘ that operate as workers where work is dispatched to. However, the workers are created in the given ‘ac:actor-context‘.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Direct subclasses

shared-dispatcher.

Direct methods

identifier.

Direct slots
Slot: context
Initargs

:context

Slot: identifier

Returns the identifier of the dispatcher.

Initargs

:identifier

Readers

identifier.

Writers

This slot is read-only.

Class: eventstream

Eventstream facility allows to post/publish messages/events in the ‘asys:actor-system‘ and actors that did subscribe, to listen on those events.

The eventstream is driven by an actor. The processing of the sent events is guaranteed to be as they arrive.

Events can be posted as plain strings, as lists, or as objects of classes.
The subscriber has a variaty of options to define what to listen for.

For example: a subscriber wants to listen to events/messages with the string "Foo".
The subscriber is then only notified when events are posted with the exact same string.

See more information at the ‘ev:subscribe‘ function.

Package

sento.eventstream.

Source

eventstream.lisp.

Direct methods
Direct slots
Slot: subscribers
Initform

(quote nil)

Readers

subscribers.

Writers

This slot is read-only.

Slot: ev-actor
Class: fsm

FSM Class

The FSM class represents a Finite State Machine, a mathematical model of computation that transitions between a finite number of states in response to external inputs.

Package

sento.fsm.

Source

fsm.lisp.

Direct superclasses

actor.

Direct methods
Direct slots
Slot: event-handling-fun
Initargs

:event-handling

Readers

event-handling-fun.

Writers

This slot is read-only.

Slot: timeouts
Initform

(make-hash-table :test (function eq))

Readers

timeouts.

Writers

This slot is read-only.

Class: future

The wrapped [blackbird](https://orthecreedence.github.io/blackbird/) ‘promise‘, here called ‘future‘. Not all features of blackbird’s ‘promise‘ are supported.
This ‘future‘ wrapper changes the terminology. A ‘future‘ is a delayed computation.
A ‘promise‘ is the fulfillment of the delayed computation.

Package

sento.future.

Source

fcomputation.lisp.

Direct methods

print-object.

Direct slots
Slot: promise
Package

blackbird-base.

Class: message-box/bt

Bordeaux-Threads based message-box with a single thread operating on a message queue.
This is used when the actor is created using a ‘:pinned‘ dispatcher type.
There is a limit on the maximum number of actors/agents that can be created with
this kind of queue because each message-box (and with that each actor) requires exactly one thread.

Package

sento.messageb.

Source

message-box.lisp.

Direct superclasses

message-box-base.

Direct methods
Direct slots
Slot: queue-thread

The thread that pops queue items.

Class: message-box/dp

This message box is a message-box that uses the ‘system‘s ‘dispatcher‘.
This has the advantage that an almost unlimited actors/agents can be created.
This message-box doesn’t ’own’ a thread. It uses the ‘dispatcher‘ to handle the message processing. The ‘dispatcher‘ is kind of like a thread pool.

Package

sento.messageb.

Source

message-box.lisp.

Direct superclasses

message-box-base.

Direct methods
Direct slots
Slot: dispatcher

The dispatcher from the system.

Initform

(error "dispatcher must be set!")

Initargs

:dispatcher

Readers

dispatcher.

Writers

This slot is read-only.

Slot: lock
Initform

(bt2:make-lock)

Class: queue-bounded

Bounded queue.

Package

sento.queue.

Source

queue.lisp.

Direct superclasses

queue-base.

Direct methods
Direct slots
Slot: queue
Slot: lock
Initform

(bt2:make-lock)

Slot: cvar
Initform

(bt2:make-condition-variable)

Slot: max-items
Initform

1000

Initargs

:max-items

Slot: fill-count
Initform

0

Class: queue-unbounded

Unbounded queue.

Package

sento.queue.

Source

queue-locked.lisp.

Direct superclasses

queue-base.

Direct methods
Direct slots
Slot: queue
Initform

(sento.queue::make-queue)

Slot: lock
Initform

(bt2:make-lock)

Slot: cvar
Initform

(bt2:make-condition-variable)

Class: router

A router combines a pool of actors and implements the actor-api protocol.
So a ‘tell‘, ‘ask-s‘ and ‘ask‘ is delegated to one of the routers routees.
While a router implements parts of the actor protocol it doesn’t implement all.
I.e. a router cannot be ‘watch‘ed.
A router ‘strategy‘ defines how one of the actors is determined as the forwarding target of the message.

Package

sento.router.

Source

router.lisp.

Direct methods
Direct slots
Slot: routees

The routees.

Initform

(make-array 2 :adjustable t :fill-pointer 0)

Slot: strategy-fun

The router strategy function.
The ‘strategy‘ is a function with a ‘fixnum‘ as input and a ‘fixnum‘ as output. The input represents the number of routees.
The output represents the index of the routee to choose by calling the function.

Initargs

:strategy-fun

Readers

strategy-fun.

Writers

This slot is read-only.

Class: shared-dispatcher

A shared dispatcher.
Internally it uses a ‘router:router‘ to drive the ‘dispatch-worker‘s. The default strategy of choosing a worker is ‘:random‘.

A ‘shared-dispatcher‘ is automatically setup by an ‘asys:actor-system‘.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Direct superclasses

dispatcher-base.

Direct methods
Direct slots
Slot: router
Class: stashing

‘stashing‘ is a mixin class to ‘act:actor‘.
It can ’stash’ away arriving messages which should not be handled now, but later, after the actor is ’able’ to handle them. Create an actor class that can stash like this:

“‘
(defclass stash-actor (actor stashing) ())
“‘

Then create an actor by specifying this type:

“‘
(actor-of system
:type ’stash-actor
:receive (lambda (msg)
...))
“‘

For stash and unstash see function descriptions below.

The main use-case is for ‘act:tell‘ and ‘act:ask‘. ‘act:ask-s‘ will not work.
timeouts are ignored because it is not clear how long stashed messages will reside in stash.
However the ‘sender‘, if given (on ‘act:tell‘), is preserved.

Package

sento.stash.

Source

stash.lisp.

Direct methods

stashed-messages.

Direct slots
Slot: stashed-messages

Stash is an unbounded list.
Stash items are a tuple (alist) of ‘msg’ and ‘sender’.

Initform

(quote nil)

Readers

stashed-messages.

Writers

This slot is read-only.

Class: task

A dedicated ‘act:actor‘ subclass used for tasks.

Package

sento.tasks.

Source

tasks.lisp.

Direct superclasses

actor.

Class: wheel-timer

Wheel timer class

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

Direct methods
Direct slots
Slot: wheel

The wheel timer.

Readers

wheel.

Writers

(setf wheel).

Slot: timer-hash

Hash table of timers. Primarily used to cancel recurring timers.

Initform

(make-hash-table :test (quote equal))

Readers

timer-hash.

Writers

(setf timer-hash).


6.2 Internals


6.2.1 Special variables

Special Variable: *current-state*

dynamically binds the current state

Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *event-was-handled-by-goto*
Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *event-was-handled-by-stay*
Package

sento.fsm.

Source

fsm.lisp.

Special Variable: *the-int*

special var used for CAS

Package

sento.atomic.

Source

atomic.lisp.

Special Variable: *the-ref*

special var used for CAS

Package

sento.atomic.

Source

atomic.lisp.


6.2.2 Macros

Macro: atomic-place (ref)
Package

sento.atomic.

Source

atomic.lisp.

Macro: with-sender (sender &rest body)
Package

sento.actor-cell.

Source

actor-cell.lisp.

Macro: with-waiting-actor (actor message system time-out &rest body)
Package

sento.actor.

Source

actor.lisp.


6.2.3 Ordinary functions

Function: %actor-of (system &rest rest &key receive init destroy dispatcher state type name context-key queue-size &allow-other-keys)

Private API to create system actors. Context-key is either ‘:internal‘ or ‘:user‘ Users should use ‘actor-of‘.

Package

sento.actor-system.

Source

actor-system.lisp.

Function: %actor-of (context create-fun &key dispatcher queue-size)

See ‘ac:actor-of‘

Package

sento.actor-context.

Source

actor-context.lisp.

Function: %add-actor (context actor)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %all-actors (system context-key)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %create-actor (context create-fun dispatcher-id queue-size)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %fcompleted (future completed-fun)
Package

sento.future.

Source

fcomputation.lisp.

Function: %find-actor-by-name (context name)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %find-actors (system path &key test key context-key)

Private API to find actors in both contexts the actor-system supports. Users should use ‘ac:find-actors‘.

Package

sento.actor-system.

Source

actor-system.lisp.

Function: %find-actors (context path &key test key)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %fmap (future map-fun)
Package

sento.future.

Source

fcomputation.lisp.

Function: %get-dispatcher-config (config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %get-eventstream-config (config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %get-scheduler-config (config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %get-shared-dispatcher (system identifier)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %get-timeout-timer-config (config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %make-atomic-integer (cell)
Package

sento.atomic.

Source

atomic.lisp.

Function: %make-atomic-reference (cell)
Package

sento.atomic.

Source

atomic.lisp.

Function: %merge-config (key config fallback)
Package

sento.config.

Source

config.lisp.

Function: %message-box-for-dispatcher-id (context dispatcher-id queue-size)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %receive (msg)
Package

sento.fsm.

Source

fsm.lisp.

Function: %register-config (system new-config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %register-dispatchers (system dispatcher-config actor-context)

Creates a plist of dispatchers for the ‘:dispatchers‘ configuration section.

Package

sento.actor-system.

Source

actor-system.lisp.

Function: %register-eventstream (system ev-config actor-context)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %register-scheduler (system scheduler-config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %register-timeout-timer (system timer-config)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: %remove-actor (context actor)
Package

sento.actor-context.

Source

actor-context.lisp.

Function: %setup-timeouts (timeouts)
Package

sento.fsm.

Source

fsm.lisp.

Function: %verify-actor (context actor)

Checks certain things on the actor before it is attached to the context.

Package

sento.actor-context.

Source

actor-context.lisp.

Function: actor-cell-state-p (object)
Package

sento.actor-cell.

Source

actor-cell.lisp.

Reader: actor-cell-state-running (instance)
Writer: (setf actor-cell-state-running) (instance)
Package

sento.actor-cell.

Source

actor-cell.lisp.

Target Slot

running.

Function: actor-context-for-key (context-key system)
Package

sento.actor-system.

Source

actor-system.lisp.

Function: agent-puthash (key hash-agent value)

Internal

Package

sento.agent.hash.

Source

hash-agent.lisp.

Setf expanders to this function

(setf agent-gethash).

Function: agent-set (index array-agent value)

Internal for ‘setf‘.

Package

sento.agent.array.

Source

array-agent.lisp.

Setf expanders to this function

(setf agent-elt).

Reader: atomic-integer-cell (instance)
Writer: (setf atomic-integer-cell) (instance)
Package

sento.atomic.

Source

atomic.lisp.

Target Slot

cell.

Function: atomic-integer-p (object)
Package

sento.atomic.

Source

atomic.lisp.

Reader: atomic-reference-cell (instance)
Writer: (setf atomic-reference-cell) (instance)
Package

sento.atomic.

Source

atomic.lisp.

Target Slot

cell.

Function: atomic-reference-p (object)
Package

sento.atomic.

Source

atomic.lisp.

Function: call-handler-fun (handler-fun-args message)

‘handler-fun-args’ is a list with a function at ‘car’ and args as ‘cdr’. ‘message’ is prepended to args.
This is used to break the environment possibly captured as closure at ’submit’ stage.

Package

sento.messageb.

Source

message-box.lisp.

Function: copy-actor-cell-state (instance)
Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: copy-atomic-integer (instance)
Package

sento.atomic.

Source

atomic.lisp.

Function: copy-atomic-reference (instance)
Package

sento.atomic.

Source

atomic.lisp.

Function: copy-fsm-state (instance)
Package

sento.fsm.

Source

fsm.lisp.

Function: copy-message-item/bt (instance)
Package

sento.messageb.

Source

message-box.lisp.

Function: copy-message-item/dp (instance)
Package

sento.messageb.

Source

message-box.lisp.

Function: copy-model (instance)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Function: copy-queue (instance)
Package

sento.queue.

Source

queue-locked.lisp.

Function: dequeue (queue)
Package

sento.queue.

Source

queue-locked.lisp.

Function: dispatch/noreply (msgbox dispatcher dispatcher-fun-args)

Used by ‘ask’.
Returns just ‘T’. Return is actually ignore.

Package

sento.messageb.

Source

message-box.lisp.

Function: dispatch/reply (msgbox push-item dispatcher dispatcher-fun-args time-out)

Used by ‘ask-s’ Returns ‘handler-result’.

Package

sento.messageb.

Source

message-box.lisp.

Function: dispatch/reply/no-timeout (msgbox dispatcher dispatcher-fun-args)

Returns dispatcher result.

Package

sento.messageb.

Source

message-box.lisp.

Function: dispatch/reply/timeout (msgbox push-item dispatcher dispatcher-fun-args)

Waits for ‘handler-result’ or timeout and returns ‘handler-result’.

Package

sento.messageb.

Source

message-box.lisp.

Function: dispatcher-exec-fun (msgbox)

This function is effectively executed on a dispatcher actor.
It knows the message-box of the origin actor and acts on it.
It pops the message from the message-boxes queue and applies the function in ‘handler-fun-args‘ on it. The ‘handler-fun-args’ is part of the message item.

Package

sento.messageb.

Source

message-box.lisp.

Function: emptyp (queue)
Package

sento.queue.

Source

queue-locked.lisp.

Function: enqueue (item queue)
Package

sento.queue.

Source

queue-locked.lisp.

Function: ev-receive (ev listener msg)
Package

sento.eventstream.

Source

eventstream.lisp.

Function: finalize-initialization (actor message-box actor-context)

Private API: finalize initialization of the actor with a ‘mesgb:message-box‘ and an ‘ac:actor-context‘.

Package

sento.actor.

Source

actor.lisp.

Reader: fsm-state-data (instance)
Writer: (setf fsm-state-data) (instance)
Package

sento.fsm.

Source

fsm.lisp.

Target Slot

data.

Function: fsm-state-p (object)
Package

sento.fsm.

Source

fsm.lisp.

Reader: fsm-state-state (instance)
Writer: (setf fsm-state-state) (instance)
Package

sento.fsm.

Source

fsm.lisp.

Target Slot

state.

Function: get-strategy-fun (strategy)
Package

sento.router.

Source

router.lisp.

Function: get-strategy-index (router)
Package

sento.router.

Source

router.lisp.

Function: handle-message (message actor-cell sender withreply-p)

This function is submitted as ‘handler-fun‘ to message-box.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: handle-message-internal (actor-cell message)

A ‘:stop‘ message will response with ‘:stopping‘ and the user handlers are not called. Otherwise the result is ‘:resume‘ to resume user message handling.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: handle-message-user (actor-cell message withreply-p)

The user defined message handler.
Effectively this calls the ‘handle-call‘ or ‘handle-cast‘ functions.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: handle-popped-item (popped-item msgbox)

Handles the popped message. Means: applies the function in ‘handler-fun-args‘ on the message.

Package

sento.messageb.

Source

message-box.lisp.

Function: make-actor-cell-state (&key running)
Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: make-fsm-state (&key state data)
Package

sento.fsm.

Source

fsm.lisp.

Function: make-future-plain (p)
Package

sento.future.

Source

fcomputation.lisp.

Function: make-message-item/bt (&key message withreply-p withreply-lock withreply-cvar time-out cancelled-p handler-fun-args handler-result)
Package

sento.messageb.

Source

message-box.lisp.

Function: make-message-item/dp (&key message time-out cancelled-p handler-fun-args handler-result)
Package

sento.messageb.

Source

message-box.lisp.

Function: make-queue (&key head tail)
Package

sento.queue.

Source

queue-locked.lisp.

Function: make-random-strategy ()

The default, built-in strategy: random.

Package

sento.router.

Source

router.lisp.

Function: make-round-robin-strategy ()

Returns a let-over-lambda that implements a round-robin strategy.

Package

sento.router.

Source

router.lisp.

Function: make-task (context dispatcher)
Package

sento.tasks.

Source

tasks.lisp.

Reader: message-item/bt-cancelled-p (instance)
Writer: (setf message-item/bt-cancelled-p) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

cancelled-p.

Reader: message-item/bt-handler-fun-args (instance)
Writer: (setf message-item/bt-handler-fun-args) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

handler-fun-args.

Reader: message-item/bt-handler-result (instance)
Writer: (setf message-item/bt-handler-result) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

handler-result.

Reader: message-item/bt-message (instance)
Writer: (setf message-item/bt-message) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

message.

Function: message-item/bt-p (object)
Package

sento.messageb.

Source

message-box.lisp.

Reader: message-item/bt-time-out (instance)
Writer: (setf message-item/bt-time-out) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

time-out.

Reader: message-item/bt-withreply-cvar (instance)
Writer: (setf message-item/bt-withreply-cvar) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

withreply-cvar.

Reader: message-item/bt-withreply-lock (instance)
Writer: (setf message-item/bt-withreply-lock) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

withreply-lock.

Reader: message-item/bt-withreply-p (instance)
Writer: (setf message-item/bt-withreply-p) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

withreply-p.

Reader: message-item/dp-cancelled-p (instance)
Writer: (setf message-item/dp-cancelled-p) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

cancelled-p.

Reader: message-item/dp-handler-fun-args (instance)
Writer: (setf message-item/dp-handler-fun-args) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

handler-fun-args.

Reader: message-item/dp-handler-result (instance)
Writer: (setf message-item/dp-handler-result) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

handler-result.

Reader: message-item/dp-message (instance)
Writer: (setf message-item/dp-message) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

message.

Function: message-item/dp-p (object)
Package

sento.messageb.

Source

message-box.lisp.

Reader: message-item/dp-time-out (instance)
Writer: (setf message-item/dp-time-out) (instance)
Package

sento.messageb.

Source

message-box.lisp.

Target Slot

time-out.

Function: message-processing-loop (msgbox)

The message processing loop.

Package

sento.messageb.

Source

message-box.lisp.

Function: model-p (object)
Package

sento.agent.usecase-commons.

Source

agent-usecase-commons.lisp.

Function: notify-watchers-about-stop (actor)
Package

sento.actor.

Source

actor.lisp.

Function: pop-queue-and-process (msgbox)

This blocks until a new queue item arrived.

Package

sento.messageb.

Source

message-box.lisp.

Function: process-queue-item (msgbox item)

The ‘time-out’ handling in here is to make sure that handling of the
message is ’interrupted’ when the message was ’cancelled’.
This should happen in conjunction with the outer time-out in ‘submit/reply’.
This function sets the result as ‘handler-result’ in ‘item’. The return of this function is not relevant.

Package

sento.messageb.

Source

message-box.lisp.

Reader: queue-head (instance)
Writer: (setf queue-head) (instance)
Package

sento.queue.

Source

queue-locked.lisp.

Target Slot

head.

Function: queue-p (object)
Package

sento.queue.

Source

queue-locked.lisp.

Reader: queue-tail (instance)
Writer: (setf queue-tail) (instance)
Package

sento.queue.

Source

queue-locked.lisp.

Target Slot

tail.

Function: receive (message)

The worker receive function.

Package

sento.dispatcher.

Source

dispatcher.lisp.

Function: receive (message)

This is the agents actor receive function implementation.
This rarely (if at all) needs to change because the agent is very specific.

Package

sento.agent.

Source

agent.lisp.

Function: stop-children (actor &optional wait)
Package

sento.actor.

Source

actor.lisp.

Function: submit-message (actor-cell message withreply-p sender time-out)

Submitting a message.
In case of ‘withreply-p‘, the ‘response‘ is filled because submitting to the message-box is synchronous. Otherwise submitting is asynchronous and ‘response‘ is just ‘t‘.
In case the actor-cell was stopped it will respond with just ‘:stopped‘.
In case no messge-box is configured this function respnds with ‘:no-message-handling‘.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: submit/no-reply (msgbox queue message handler-fun-args)

This is quite efficient, no locking necessary.
If the message was submitted with timeout then the timeout plays no role here, the message is handled anyhow. The submitting code has to await the side-effect and possibly handle a timeout.

Package

sento.messageb.

Source

message-box.lisp.

Function: submit/reply (msgbox queue message time-out handler-fun-args)

This function has to provide a result and so it has to wait until the queue thread has processed the message. Processing of the queue item is done in ‘process-queue-item’.

Package

sento.messageb.

Source

message-box.lisp.

Function: subscribers-for (subscribers msg-type msg)
Package

sento.eventstream.

Source

eventstream.lisp.

Function: wait-and-probe-for-msg-handler-result (msgbox push-item)
Package

sento.messageb.

Source

message-box.lisp.


6.2.4 Generic functions

Generic Function: actors (context)
Package

sento.actor-context.

Methods
Method: actors ((context actor-context))
Source

actor-context.lisp.

Generic Reader: config (object)
Generic Writer: (setf config) (object)
Package

sento.actor-system.

Methods
Reader Method: config ((actor-system actor-system))
Writer Method: (setf config) ((actor-system actor-system))

Internal API: the actor-system configuration.

Source

actor-system.lisp.

Target Slot

config.

Generic Reader: dispatcher (object)
Package

sento.messageb.

Methods
Reader Method: dispatcher ((message-box/dp message-box/dp))

The dispatcher from the system.

Source

message-box.lisp.

Target Slot

dispatcher.

Generic Reader: event-handling-fun (object)
Package

sento.fsm.

Methods
Reader Method: event-handling-fun ((fsm fsm))

automatically generated reader method

Source

fsm.lisp.

Target Slot

event-handling-fun.

Generic Reader: internal-actor-context (object)
Package

sento.actor-system.

Methods
Reader Method: internal-actor-context ((actor-system actor-system))

Internal API: an actor context reserved for agents/actors used by the system.

Source

actor-system.lisp.

Target Slot

internal-actor-context.

Generic Reader: max-queue-size (object)
Package

sento.messageb.

Methods
Reader Method: max-queue-size ((message-box-base message-box-base))

0 or nil will make an unbounded queue.
A value ‘> 0‘ will make a bounded queue.
Don’t make it too small. A queue size of 1000 might be a good choice.

Source

message-box.lisp.

Target Slot

max-queue-size.

Generic Reader: name (object)
Package

sento.messageb.

Methods
Reader Method: name ((message-box-base message-box-base))

The name of the message-box.
The default name is concatenated of "mesgb-" and a ‘gensym‘ generated random number.

Source

message-box.lisp.

Target Slot

name.

Generic Function: name (self)
Package

sento.actor.

Methods
Method: name ((self actor))
Source

actor.lisp.

Generic Reader: name (condition)
Package

sento.actor-context.

Methods
Reader Method: name ((condition actor-name-exists))
Source

actor-context-api.lisp.

Target Slot

name.

Generic Reader: queue (condition)
Package

sento.queue.

Methods
Reader Method: queue ((condition queue-full-error))
Source

queue.lisp.

Target Slot

queue.

Generic Reader: receive (object)
Package

sento.actor.

Methods
Reader Method: receive ((actor actor))

‘receive‘ is a function that has to take 1 parameter:
- ‘msg‘: the received message
The ‘sender‘ of the message (if available) accessible with ‘act:*sender*‘ from within the receive function or a behavior.

Source

actor-api.lisp.

Target Slot

receive.

Generic Reader: stashed-messages (object)
Package

sento.stash.

Methods
Reader Method: stashed-messages ((stashing stashing))

Stash is an unbounded list.
Stash items are a tuple (alist) of ‘msg’ and ‘sender’.

Source

stash.lisp.

Target Slot

stashed-messages.

Generic Reader: subscribers (object)
Package

sento.eventstream.

Methods
Reader Method: subscribers ((eventstream eventstream))

automatically generated reader method

Source

eventstream.lisp.

Target Slot

subscribers.

Generic Reader: timeout-timer (object)
Package

sento.actor-system.

Methods
Reader Method: timeout-timer ((actor-system actor-system))

Internal API: A wheel-timer used for timeouts to make timeouts less resource expensive.
This shouldn’t be used freely. It is used internally by the system to support ‘act:ask‘ timeouts.

Source

actor-system.lisp.

Target Slot

timeout-timer.

Generic Reader: timeouts (object)
Package

sento.fsm.

Methods
Reader Method: timeouts ((fsm fsm))

automatically generated reader method

Source

fsm.lisp.

Target Slot

timeouts.

Generic Reader: timer-hash (object)
Generic Writer: (setf timer-hash) (object)
Package

sento.wheel-timer.

Methods
Reader Method: timer-hash ((wheel-timer wheel-timer))
Writer Method: (setf timer-hash) ((wheel-timer wheel-timer))

Hash table of timers. Primarily used to cancel recurring timers.

Source

wheel-timer.lisp.

Target Slot

timer-hash.

Generic Reader: user-actor-context (object)
Package

sento.actor-system.

Methods
Reader Method: user-actor-context ((actor-system actor-system))

Internal API: an actor context for agents/actors created by the user.

Source

actor-system.lisp.

Target Slot

user-actor-context.

Generic Reader: wait-time (condition)
Package

sento.timeutils.

Methods
Reader Method: wait-time ((condition ask-timeout))
Source

timeutils.lisp.

Target Slot

wait-time.

Generic Reader: wheel (object)
Generic Writer: (setf wheel) (object)
Package

sento.wheel-timer.

Methods
Reader Method: wheel ((wheel-timer wheel-timer))
Writer Method: (setf wheel) ((wheel-timer wheel-timer))

The wheel timer.

Source

wheel-timer.lisp.

Target Slot

wheel.


6.2.5 Structures

Structure: actor-cell-state
Package

sento.actor-cell.

Source

actor-cell.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: running
Type

boolean

Initform

t

Readers

actor-cell-state-running.

Writers

(setf actor-cell-state-running).

Structure: atomic-integer

Wrapper atomics package.

Package

sento.atomic.

Source

atomic.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: cell
Readers

atomic-integer-cell.

Writers

(setf atomic-integer-cell).

Structure: atomic-reference

Wrapper atomics package.

Package

sento.atomic.

Source

atomic.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: cell
Readers

atomic-reference-cell.

Writers

(setf atomic-reference-cell).

Structure: fsm-state

Finite-state-machine state model.

Package

sento.fsm.

Source

fsm.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: state
Readers

fsm-state-state.

Writers

(setf fsm-state-state).

Slot: data
Readers

fsm-state-data.

Writers

(setf fsm-state-data).

Structure: message-item/bt
Package

sento.messageb.

Source

message-box.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: message
Readers

message-item/bt-message.

Writers

(setf message-item/bt-message).

Slot: withreply-p
Type

boolean

Readers

message-item/bt-withreply-p.

Writers

(setf message-item/bt-withreply-p).

Slot: withreply-lock
Readers

message-item/bt-withreply-lock.

Writers

(setf message-item/bt-withreply-lock).

Slot: withreply-cvar
Readers

message-item/bt-withreply-cvar.

Writers

(setf message-item/bt-withreply-cvar).

Slot: time-out
Readers

message-item/bt-time-out.

Writers

(setf message-item/bt-time-out).

Slot: cancelled-p
Type

boolean

Readers

message-item/bt-cancelled-p.

Writers

(setf message-item/bt-cancelled-p).

Slot: handler-fun-args
Type

list

Readers

message-item/bt-handler-fun-args.

Writers

(setf message-item/bt-handler-fun-args).

Slot: handler-result
Initform

(quote sento.messageb::no-result)

Readers

message-item/bt-handler-result.

Writers

(setf message-item/bt-handler-result).

Structure: message-item/dp
Package

sento.messageb.

Source

message-box.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: message
Readers

message-item/dp-message.

Writers

(setf message-item/dp-message).

Slot: time-out
Readers

message-item/dp-time-out.

Writers

(setf message-item/dp-time-out).

Slot: cancelled-p
Type

boolean

Readers

message-item/dp-cancelled-p.

Writers

(setf message-item/dp-cancelled-p).

Slot: handler-fun-args
Type

list

Readers

message-item/dp-handler-fun-args.

Writers

(setf message-item/dp-handler-fun-args).

Slot: handler-result
Initform

(quote sento.messageb::no-result)

Readers

message-item/dp-handler-result.

Writers

(setf message-item/dp-handler-result).

Structure: queue
Package

sento.queue.

Source

queue-locked.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: head
Type

list

Initform

(quote nil)

Readers

queue-head.

Writers

(setf queue-head).

Slot: tail
Type

list

Initform

(quote nil)

Readers

queue-tail.

Writers

(setf queue-tail).


6.2.6 Classes

Class: async-waitor-actor
Package

sento.actor.

Source

actor.lisp.

Direct superclasses

actor.

Class: message-box-base

The user does not need to create a message-box manually. It is automatically created and added to the ‘actor‘ when the actor is created through ‘ac:actor-of‘.

Package

sento.messageb.

Source

message-box.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name

The name of the message-box.
The default name is concatenated of "mesgb-" and a ‘gensym‘ generated random number.

Initform

(string (gensym "mesgb-"))

Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: processed-messages
Initform

0

Slot: queue

Which type of queue will be used depends on the ‘max-queue-size‘ setting.

Slot: should-run

Flag that indicates whether the message processing should commence.

Initform

t

Slot: max-queue-size

0 or nil will make an unbounded queue.
A value ‘> 0‘ will make a bounded queue.
Don’t make it too small. A queue size of 1000 might be a good choice.

Initform

0

Initargs

:max-queue-size

Readers

max-queue-size.

Writers

This slot is read-only.

Class: queue-base

The base queue.

Package

sento.queue.

Source

queue.lisp.

Direct subclasses

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   !   %   (   ?  
A   B   C   D   E   F   G   H   I   M   N   O   P   Q   R   S   T   U   W  
Index Entry  Section

!
!: Public generic functions

%
%actor-of: Private ordinary functions
%actor-of: Private ordinary functions
%add-actor: Private ordinary functions
%all-actors: Private ordinary functions
%create-actor: Private ordinary functions
%fcompleted: Private ordinary functions
%find-actor-by-name: Private ordinary functions
%find-actors: Private ordinary functions
%find-actors: Private ordinary functions
%fmap: Private ordinary functions
%get-dispatcher-config: Private ordinary functions
%get-eventstream-config: Private ordinary functions
%get-scheduler-config: Private ordinary functions
%get-shared-dispatcher: Private ordinary functions
%get-timeout-timer-config: Private ordinary functions
%make-atomic-integer: Private ordinary functions
%make-atomic-reference: Private ordinary functions
%merge-config: Private ordinary functions
%message-box-for-dispatcher-id: Private ordinary functions
%receive: Private ordinary functions
%register-config: Private ordinary functions
%register-dispatchers: Private ordinary functions
%register-eventstream: Private ordinary functions
%register-scheduler: Private ordinary functions
%register-timeout-timer: Private ordinary functions
%remove-actor: Private ordinary functions
%setup-timeouts: Private ordinary functions
%verify-actor: Private ordinary functions

(
(setf actor-cell-state-running): Private ordinary functions
(setf agent-elt): Public setf expanders
(setf agent-gethash): Public setf expanders
(setf atomic-integer-cell): Private ordinary functions
(setf atomic-reference-cell): Private ordinary functions
(setf config): Private generic functions
(setf config): Private generic functions
(setf context): Public generic functions
(setf context): Public generic functions
(setf fsm-state-data): Private ordinary functions
(setf fsm-state-state): Private ordinary functions
(setf message-item/bt-cancelled-p): Private ordinary functions
(setf message-item/bt-handler-fun-args): Private ordinary functions
(setf message-item/bt-handler-result): Private ordinary functions
(setf message-item/bt-message): Private ordinary functions
(setf message-item/bt-time-out): Private ordinary functions
(setf message-item/bt-withreply-cvar): Private ordinary functions
(setf message-item/bt-withreply-lock): Private ordinary functions
(setf message-item/bt-withreply-p): Private ordinary functions
(setf message-item/dp-cancelled-p): Private ordinary functions
(setf message-item/dp-handler-fun-args): Private ordinary functions
(setf message-item/dp-handler-result): Private ordinary functions
(setf message-item/dp-message): Private ordinary functions
(setf message-item/dp-time-out): Private ordinary functions
(setf model-err-fun): Public ordinary functions
(setf model-object): Public ordinary functions
(setf msgbox): Public generic functions
(setf msgbox): Public generic functions
(setf queue-head): Private ordinary functions
(setf queue-tail): Private ordinary functions
(setf timer-hash): Private generic functions
(setf timer-hash): Private generic functions
(setf wheel): Private generic functions
(setf wheel): Private generic functions

?
?: Public generic functions

A
actor-cell-state-p: Private ordinary functions
actor-cell-state-running: Private ordinary functions
actor-context-for-key: Private ordinary functions
actor-of: Public generic functions
actor-of: Public generic functions
actor-of: Public generic functions
actor-of: Public generic functions
actors: Private generic functions
actors: Private generic functions
add-routee: Public ordinary functions
after-stop: Public generic functions
after-stop: Public generic functions
agent-clrhash: Public ordinary functions
agent-delete: Public ordinary functions
agent-doarray: Public ordinary functions
agent-dohash: Public ordinary functions
agent-elt: Public ordinary functions
agent-get: Public ordinary functions
agent-get-quick: Public ordinary functions
agent-gethash: Public ordinary functions
agent-pop: Public ordinary functions
agent-push: Public ordinary functions
agent-push-and-getidx: Public ordinary functions
agent-puthash: Private ordinary functions
agent-remhash: Public ordinary functions
agent-set: Private ordinary functions
agent-stop: Public ordinary functions
agent-update: Public ordinary functions
agent-update-and-get: Public ordinary functions
all-actors: Public generic functions
all-actors: Public generic functions
all-actors: Public generic functions
all-actors: Public generic functions
ask: Public generic functions
ask: Public generic functions
ask: Public generic functions
ask-s: Public generic functions
ask-s: Public generic functions
ask-s: Public generic functions
assert-cond: Public ordinary functions
atomic-cas: Public generic functions
atomic-cas: Public generic functions
atomic-cas: Public generic functions
atomic-get: Public generic functions
atomic-get: Public generic functions
atomic-get: Public generic functions
atomic-integer-cell: Private ordinary functions
atomic-integer-p: Private ordinary functions
atomic-place: Private macros
atomic-reference-cell: Private ordinary functions
atomic-reference-p: Private ordinary functions
atomic-swap: Public generic functions
atomic-swap: Public generic functions
atomic-swap: Public generic functions
await-cond: Public macros

B
become: Public generic functions
become: Public generic functions

C
call: Public ordinary functions
call-handler-fun: Private ordinary functions
cancel: Public ordinary functions
cast: Public ordinary functions
cause: Public generic functions
cause: Public generic functions
collect-backtrace: Public ordinary functions
complete-p: Public ordinary functions
config: Private generic functions
config: Private generic functions
config-from: Public ordinary functions
context: Public generic functions
context: Public generic functions
copy-actor-cell-state: Private ordinary functions
copy-atomic-integer: Private ordinary functions
copy-atomic-reference: Private ordinary functions
copy-fsm-state: Private ordinary functions
copy-message-item/bt: Private ordinary functions
copy-message-item/dp: Private ordinary functions
copy-model: Private ordinary functions
copy-queue: Private ordinary functions

D
dequeue: Private ordinary functions
dispatch: Public generic functions
dispatch: Public generic functions
dispatch-async: Public generic functions
dispatch-async: Public generic functions
dispatch/noreply: Private ordinary functions
dispatch/reply: Private ordinary functions
dispatch/reply/no-timeout: Private ordinary functions
dispatch/reply/timeout: Private ordinary functions
dispatcher: Private generic functions
dispatcher: Private generic functions
dispatcher-exec-fun: Private ordinary functions
dispatchers: Public generic functions
dispatchers: Public generic functions

E
emptyp: Private ordinary functions
emptyq-p: Public generic functions
emptyq-p: Public generic functions
emptyq-p: Public generic functions
enqueue: Private ordinary functions
error-p: Public ordinary functions
ev-receive: Private ordinary functions
event-handling-fun: Private generic functions
event-handling-fun: Private generic functions
evstream: Public generic functions
evstream: Public generic functions

F
fasync-completed: Public macros
fawait: Public ordinary functions
fcompleted: Public macros
filter: Public ordinary functions
finalize-initialization: Private ordinary functions
find-actors: Public generic functions
find-actors: Public generic functions
find-actors: Public generic functions
find-actors: Public generic functions
fmap: Public macros
frecover: Public macros
fresult: Public ordinary functions
fsm-state-data: Private ordinary functions
fsm-state-p: Private ordinary functions
fsm-state-state: Private ordinary functions
Function, %actor-of: Private ordinary functions
Function, %actor-of: Private ordinary functions
Function, %add-actor: Private ordinary functions
Function, %all-actors: Private ordinary functions
Function, %create-actor: Private ordinary functions
Function, %fcompleted: Private ordinary functions
Function, %find-actor-by-name: Private ordinary functions
Function, %find-actors: Private ordinary functions
Function, %find-actors: Private ordinary functions
Function, %fmap: Private ordinary functions
Function, %get-dispatcher-config: Private ordinary functions
Function, %get-eventstream-config: Private ordinary functions
Function, %get-scheduler-config: Private ordinary functions
Function, %get-shared-dispatcher: Private ordinary functions
Function, %get-timeout-timer-config: Private ordinary functions
Function, %make-atomic-integer: Private ordinary functions
Function, %make-atomic-reference: Private ordinary functions
Function, %merge-config: Private ordinary functions
Function, %message-box-for-dispatcher-id: Private ordinary functions
Function, %receive: Private ordinary functions
Function, %register-config: Private ordinary functions
Function, %register-dispatchers: Private ordinary functions
Function, %register-eventstream: Private ordinary functions
Function, %register-scheduler: Private ordinary functions
Function, %register-timeout-timer: Private ordinary functions
Function, %remove-actor: Private ordinary functions
Function, %setup-timeouts: Private ordinary functions
Function, %verify-actor: Private ordinary functions
Function, (setf actor-cell-state-running): Private ordinary functions
Function, (setf atomic-integer-cell): Private ordinary functions
Function, (setf atomic-reference-cell): Private ordinary functions
Function, (setf fsm-state-data): Private ordinary functions
Function, (setf fsm-state-state): Private ordinary functions
Function, (setf message-item/bt-cancelled-p): Private ordinary functions
Function, (setf message-item/bt-handler-fun-args): Private ordinary functions
Function, (setf message-item/bt-handler-result): Private ordinary functions
Function, (setf message-item/bt-message): Private ordinary functions
Function, (setf message-item/bt-time-out): Private ordinary functions
Function, (setf message-item/bt-withreply-cvar): Private ordinary functions
Function, (setf message-item/bt-withreply-lock): Private ordinary functions
Function, (setf message-item/bt-withreply-p): Private ordinary functions
Function, (setf message-item/dp-cancelled-p): Private ordinary functions
Function, (setf message-item/dp-handler-fun-args): Private ordinary functions
Function, (setf message-item/dp-handler-result): Private ordinary functions
Function, (setf message-item/dp-message): Private ordinary functions
Function, (setf message-item/dp-time-out): Private ordinary functions
Function, (setf model-err-fun): Public ordinary functions
Function, (setf model-object): Public ordinary functions
Function, (setf queue-head): Private ordinary functions
Function, (setf queue-tail): Private ordinary functions
Function, actor-cell-state-p: Private ordinary functions
Function, actor-cell-state-running: Private ordinary functions
Function, actor-context-for-key: Private ordinary functions
Function, add-routee: Public ordinary functions
Function, agent-clrhash: Public ordinary functions
Function, agent-delete: Public ordinary functions
Function, agent-doarray: Public ordinary functions
Function, agent-dohash: Public ordinary functions
Function, agent-elt: Public ordinary functions
Function, agent-get: Public ordinary functions
Function, agent-get-quick: Public ordinary functions
Function, agent-gethash: Public ordinary functions
Function, agent-pop: Public ordinary functions
Function, agent-push: Public ordinary functions
Function, agent-push-and-getidx: Public ordinary functions
Function, agent-puthash: Private ordinary functions
Function, agent-remhash: Public ordinary functions
Function, agent-set: Private ordinary functions
Function, agent-stop: Public ordinary functions
Function, agent-update: Public ordinary functions
Function, agent-update-and-get: Public ordinary functions
Function, assert-cond: Public ordinary functions
Function, atomic-integer-cell: Private ordinary functions
Function, atomic-integer-p: Private ordinary functions
Function, atomic-reference-cell: Private ordinary functions
Function, atomic-reference-p: Private ordinary functions
Function, call: Public ordinary functions
Function, call-handler-fun: Private ordinary functions
Function, cancel: Public ordinary functions
Function, cast: Public ordinary functions
Function, collect-backtrace: Public ordinary functions
Function, complete-p: Public ordinary functions
Function, config-from: Public ordinary functions
Function, copy-actor-cell-state: Private ordinary functions
Function, copy-atomic-integer: Private ordinary functions
Function, copy-atomic-reference: Private ordinary functions
Function, copy-fsm-state: Private ordinary functions
Function, copy-message-item/bt: Private ordinary functions
Function, copy-message-item/dp: Private ordinary functions
Function, copy-model: Private ordinary functions
Function, copy-queue: Private ordinary functions
Function, dequeue: Private ordinary functions
Function, dispatch/noreply: Private ordinary functions
Function, dispatch/reply: Private ordinary functions
Function, dispatch/reply/no-timeout: Private ordinary functions
Function, dispatch/reply/timeout: Private ordinary functions
Function, dispatcher-exec-fun: Private ordinary functions
Function, emptyp: Private ordinary functions
Function, enqueue: Private ordinary functions
Function, error-p: Public ordinary functions
Function, ev-receive: Private ordinary functions
Function, fawait: Public ordinary functions
Function, filter: Public ordinary functions
Function, finalize-initialization: Private ordinary functions
Function, fresult: Public ordinary functions
Function, fsm-state-data: Private ordinary functions
Function, fsm-state-p: Private ordinary functions
Function, fsm-state-state: Private ordinary functions
Function, futurep: Public ordinary functions
Function, get-current-millis: Public ordinary functions
Function, get-strategy-fun: Private ordinary functions
Function, get-strategy-index: Private ordinary functions
Function, handle-message: Private ordinary functions
Function, handle-message-internal: Private ordinary functions
Function, handle-message-user: Private ordinary functions
Function, handle-popped-item: Private ordinary functions
Function, has-stashed-messages-p: Public ordinary functions
Function, make-actor-cell-state: Private ordinary functions
Function, make-actor-context: Public ordinary functions
Function, make-actor-system: Public ordinary functions
Function, make-agent: Public ordinary functions
Function, make-array-agent: Public ordinary functions
Function, make-atomic-integer: Public ordinary functions
Function, make-atomic-reference: Public ordinary functions
Function, make-dispatcher: Public ordinary functions
Function, make-dispatcher-worker: Public ordinary functions
Function, make-eventstream: Public ordinary functions
Function, make-fsm: Public ordinary functions
Function, make-fsm-state: Private ordinary functions
Function, make-future: Public ordinary functions
Function, make-future-plain: Private ordinary functions
Function, make-hash-agent: Public ordinary functions
Function, make-message-item/bt: Private ordinary functions
Function, make-message-item/dp: Private ordinary functions
Function, make-model: Public ordinary functions
Function, make-queue: Private ordinary functions
Function, make-random-strategy: Private ordinary functions
Function, make-round-robin-strategy: Private ordinary functions
Function, make-router: Public ordinary functions
Function, make-task: Private ordinary functions
Function, make-timer: Public ordinary functions
Function, make-wheel-timer: Public ordinary functions
Function, merge-config: Public ordinary functions
Function, message-item/bt-cancelled-p: Private ordinary functions
Function, message-item/bt-handler-fun-args: Private ordinary functions
Function, message-item/bt-handler-result: Private ordinary functions
Function, message-item/bt-message: Private ordinary functions
Function, message-item/bt-p: Private ordinary functions
Function, message-item/bt-time-out: Private ordinary functions
Function, message-item/bt-withreply-cvar: Private ordinary functions
Function, message-item/bt-withreply-lock: Private ordinary functions
Function, message-item/bt-withreply-p: Private ordinary functions
Function, message-item/dp-cancelled-p: Private ordinary functions
Function, message-item/dp-handler-fun-args: Private ordinary functions
Function, message-item/dp-handler-result: Private ordinary functions
Function, message-item/dp-message: Private ordinary functions
Function, message-item/dp-p: Private ordinary functions
Function, message-item/dp-time-out: Private ordinary functions
Function, message-processing-loop: Private ordinary functions
Function, mkstr: Public ordinary functions
Function, model-err-fun: Public ordinary functions
Function, model-object: Public ordinary functions
Function, model-p: Private ordinary functions
Function, notify-watchers-about-stop: Private ordinary functions
Function, pop-queue-and-process: Private ordinary functions
Function, process-queue-item: Private ordinary functions
Function, queue-head: Private ordinary functions
Function, queue-p: Private ordinary functions
Function, queue-tail: Private ordinary functions
Function, receive: Private ordinary functions
Function, receive: Private ordinary functions
Function, register-dispatcher: Public ordinary functions
Function, register-new-dispatcher: Public ordinary functions
Function, reply: Public ordinary functions
Function, retrieve-keys: Public ordinary functions
Function, retrieve-section: Public ordinary functions
Function, retrieve-value: Public ordinary functions
Function, routees: Public ordinary functions
Function, running-p: Public ordinary functions
Function, schedule-once: Public ordinary functions
Function, schedule-recurring: Public ordinary functions
Function, shutdown-wheel-timer: Public ordinary functions
Function, stash: Public ordinary functions
Function, stop: Public ordinary functions
Function, stop-children: Private ordinary functions
Function, submit-message: Private ordinary functions
Function, submit/no-reply: Private ordinary functions
Function, submit/reply: Private ordinary functions
Function, subscribers-for: Private ordinary functions
Function, task-async: Public ordinary functions
Function, task-async-stream: Public ordinary functions
Function, task-await: Public ordinary functions
Function, task-shutdown: Public ordinary functions
Function, task-start: Public ordinary functions
Function, task-yield: Public ordinary functions
Function, unstash-all: Public ordinary functions
Function, wait-and-probe-for-msg-handler-result: Private ordinary functions
Function, wait-cond: Public ordinary functions
futurep: Public ordinary functions

G
Generic Function, !: Public generic functions
Generic Function, (setf config): Private generic functions
Generic Function, (setf context): Public generic functions
Generic Function, (setf msgbox): Public generic functions
Generic Function, (setf timer-hash): Private generic functions
Generic Function, (setf wheel): Private generic functions
Generic Function, ?: Public generic functions
Generic Function, actor-of: Public generic functions
Generic Function, actors: Private generic functions
Generic Function, after-stop: Public generic functions
Generic Function, all-actors: Public generic functions
Generic Function, ask: Public generic functions
Generic Function, ask-s: Public generic functions
Generic Function, atomic-cas: Public generic functions
Generic Function, atomic-get: Public generic functions
Generic Function, atomic-swap: Public generic functions
Generic Function, become: Public generic functions
Generic Function, cause: Public generic functions
Generic Function, config: Private generic functions
Generic Function, context: Public generic functions
Generic Function, dispatch: Public generic functions
Generic Function, dispatch-async: Public generic functions
Generic Function, dispatcher: Private generic functions
Generic Function, dispatchers: Public generic functions
Generic Function, emptyq-p: Public generic functions
Generic Function, event-handling-fun: Private generic functions
Generic Function, evstream: Public generic functions
Generic Function, find-actors: Public generic functions
Generic Function, handle-call: Public generic functions
Generic Function, handle-cast: Public generic functions
Generic Function, id: Public generic functions
Generic Function, identifier: Public generic functions
Generic Function, internal-actor-context: Private generic functions
Generic Function, make-actor: Public generic functions
Generic Function, max-queue-size: Private generic functions
Generic Function, msgbox: Public generic functions
Generic Function, name: Public generic functions
Generic Function, name: Private generic functions
Generic Function, name: Private generic functions
Generic Function, name: Private generic functions
Generic Function, notify: Public generic functions
Generic Function, path: Public generic functions
Generic Function, popq: Public generic functions
Generic Function, pre-start: Public generic functions
Generic Function, publish: Public generic functions
Generic Function, pushq: Public generic functions
Generic Function, queue: Private generic functions
Generic Function, queued-count: Public generic functions
Generic Function, receive: Private generic functions
Generic Function, scheduler: Public generic functions
Generic Function, shutdown: Public generic functions
Generic Function, stashed-messages: Private generic functions
Generic Function, state: Public generic functions
Generic Function, stop: Public generic functions
Generic Function, stop: Public generic functions
Generic Function, stop: Public generic functions
Generic Function, stop: Public generic functions
Generic Function, strategy-fun: Public generic functions
Generic Function, submit: Public generic functions
Generic Function, subscribe: Public generic functions
Generic Function, subscribers: Private generic functions
Generic Function, system: Public generic functions
Generic Function, tell: Public generic functions
Generic Function, timeout-timer: Private generic functions
Generic Function, timeouts: Private generic functions
Generic Function, timer-hash: Private generic functions
Generic Function, unbecome: Public generic functions
Generic Function, unsubscribe: Public generic functions
Generic Function, unwatch: Public generic functions
Generic Function, user-actor-context: Private generic functions
Generic Function, wait-time: Private generic functions
Generic Function, watch: Public generic functions
Generic Function, watchers: Public generic functions
Generic Function, wheel: Private generic functions
Generic Function, workers: Public generic functions
get-current-millis: Public ordinary functions
get-strategy-fun: Private ordinary functions
get-strategy-index: Private ordinary functions
goto-state: Public macros

H
handle-call: Public generic functions
handle-call: Public generic functions
handle-cast: Public generic functions
handle-cast: Public generic functions
handle-message: Private ordinary functions
handle-message-internal: Private ordinary functions
handle-message-user: Private ordinary functions
handle-popped-item: Private ordinary functions
has-stashed-messages-p: Public ordinary functions

I
id: Public generic functions
id: Public generic functions
identifier: Public generic functions
identifier: Public generic functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
internal-actor-context: Private generic functions
internal-actor-context: Private generic functions

M
Macro, atomic-place: Private macros
Macro, await-cond: Public macros
Macro, fasync-completed: Public macros
Macro, fcompleted: Public macros
Macro, fmap: Public macros
Macro, frecover: Public macros
Macro, goto-state: Public macros
Macro, on-event: Public macros
Macro, on-transition: Public macros
Macro, stay-on-state: Public macros
Macro, when-state: Public macros
Macro, when-unhandled: Public macros
Macro, with-context: Public macros
Macro, with-fut: Public macros
Macro, with-fut-resolve: Public macros
Macro, with-get-handler: Public macros
Macro, with-sender: Private macros
Macro, with-update-handler: Public macros
Macro, with-waitfor: Public macros
Macro, with-waiting-actor: Private macros
make-actor: Public generic functions
make-actor: Public generic functions
make-actor-cell-state: Private ordinary functions
make-actor-context: Public ordinary functions
make-actor-system: Public ordinary functions
make-agent: Public ordinary functions
make-array-agent: Public ordinary functions
make-atomic-integer: Public ordinary functions
make-atomic-reference: Public ordinary functions
make-dispatcher: Public ordinary functions
make-dispatcher-worker: Public ordinary functions
make-eventstream: Public ordinary functions
make-fsm: Public ordinary functions
make-fsm-state: Private ordinary functions
make-future: Public ordinary functions
make-future-plain: Private ordinary functions
make-hash-agent: Public ordinary functions
make-message-item/bt: Private ordinary functions
make-message-item/dp: Private ordinary functions
make-model: Public ordinary functions
make-queue: Private ordinary functions
make-random-strategy: Private ordinary functions
make-round-robin-strategy: Private ordinary functions
make-router: Public ordinary functions
make-task: Private ordinary functions
make-timer: Public ordinary functions
make-wheel-timer: Public ordinary functions
max-queue-size: Private generic functions
max-queue-size: Private generic functions
merge-config: Public ordinary functions
message-item/bt-cancelled-p: Private ordinary functions
message-item/bt-handler-fun-args: Private ordinary functions
message-item/bt-handler-result: Private ordinary functions
message-item/bt-message: Private ordinary functions
message-item/bt-p: Private ordinary functions
message-item/bt-time-out: Private ordinary functions
message-item/bt-withreply-cvar: Private ordinary functions
message-item/bt-withreply-lock: Private ordinary functions
message-item/bt-withreply-p: Private ordinary functions
message-item/dp-cancelled-p: Private ordinary functions
message-item/dp-handler-fun-args: Private ordinary functions
message-item/dp-handler-result: Private ordinary functions
message-item/dp-message: Private ordinary functions
message-item/dp-p: Private ordinary functions
message-item/dp-time-out: Private ordinary functions
message-processing-loop: Private ordinary functions
Method, (setf config): Private generic functions
Method, (setf context): Public generic functions
Method, (setf msgbox): Public generic functions
Method, (setf timer-hash): Private generic functions
Method, (setf wheel): Private generic functions
Method, actor-of: Public generic functions
Method, actor-of: Public generic functions
Method, actor-of: Public generic functions
Method, actors: Private generic functions
Method, after-stop: Public generic functions
Method, all-actors: Public generic functions
Method, all-actors: Public generic functions
Method, all-actors: Public generic functions
Method, ask: Public generic functions
Method, ask: Public generic functions
Method, ask-s: Public generic functions
Method, ask-s: Public generic functions
Method, atomic-cas: Public generic functions
Method, atomic-cas: Public generic functions
Method, atomic-get: Public generic functions
Method, atomic-get: Public generic functions
Method, atomic-swap: Public generic functions
Method, atomic-swap: Public generic functions
Method, become: Public generic functions
Method, cause: Public generic functions
Method, config: Private generic functions
Method, context: Public generic functions
Method, dispatch: Public generic functions
Method, dispatch-async: Public generic functions
Method, dispatcher: Private generic functions
Method, dispatchers: Public generic functions
Method, emptyq-p: Public generic functions
Method, emptyq-p: Public generic functions
Method, event-handling-fun: Private generic functions
Method, evstream: Public generic functions
Method, find-actors: Public generic functions
Method, find-actors: Public generic functions
Method, find-actors: Public generic functions
Method, handle-call: Public generic functions
Method, handle-cast: Public generic functions
Method, id: Public generic functions
Method, identifier: Public generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, internal-actor-context: Private generic functions
Method, make-actor: Public generic functions
Method, max-queue-size: Private generic functions
Method, msgbox: Public generic functions
Method, name: Public generic functions
Method, name: Private generic functions
Method, name: Private generic functions
Method, name: Private generic functions
Method, notify: Public generic functions
Method, path: Public generic functions
Method, popq: Public generic functions
Method, popq: Public generic functions
Method, pre-start: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, publish: Public generic functions
Method, publish: Public generic functions
Method, publish: Public generic functions
Method, pushq: Public generic functions
Method, pushq: Public generic functions
Method, queue: Private generic functions
Method, queued-count: Public generic functions
Method, receive: Private generic functions
Method, scheduler: Public generic functions
Method, shutdown: Public generic functions
Method, shutdown: Public generic functions
Method, stashed-messages: Private generic functions
Method, state: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, stop: Public generic functions
Method, strategy-fun: Public generic functions
Method, submit: Public generic functions
Method, submit: Public generic functions
Method, subscribe: Public generic functions
Method, subscribe: Public generic functions
Method, subscribe: Public generic functions
Method, subscribers: Private generic functions
Method, system: Public generic functions
Method, system: Public generic functions
Method, tell: Public generic functions
Method, tell: Public generic functions
Method, timeout-timer: Private generic functions
Method, timeouts: Private generic functions
Method, timer-hash: Private generic functions
Method, unbecome: Public generic functions
Method, unsubscribe: Public generic functions
Method, unsubscribe: Public generic functions
Method, unsubscribe: Public generic functions
Method, unwatch: Public generic functions
Method, user-actor-context: Private generic functions
Method, wait-time: Private generic functions
Method, watch: Public generic functions
Method, watchers: Public generic functions
Method, wheel: Private generic functions
Method, workers: Public generic functions
mkstr: Public ordinary functions
model-err-fun: Public ordinary functions
model-object: Public ordinary functions
model-p: Private ordinary functions
msgbox: Public generic functions
msgbox: Public generic functions

N
name: Public generic functions
name: Public generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
name: Private generic functions
notify: Public generic functions
notify: Public generic functions
notify-watchers-about-stop: Private ordinary functions

O
on-event: Public macros
on-transition: Public macros

P
path: Public generic functions
path: Public generic functions
pop-queue-and-process: Private ordinary functions
popq: Public generic functions
popq: Public generic functions
popq: Public generic functions
pre-start: Public generic functions
pre-start: Public generic functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
process-queue-item: Private ordinary functions
publish: Public generic functions
publish: Public generic functions
publish: Public generic functions
publish: Public generic functions
pushq: Public generic functions
pushq: Public generic functions
pushq: Public generic functions

Q
queue: Private generic functions
queue: Private generic functions
queue-head: Private ordinary functions
queue-p: Private ordinary functions
queue-tail: Private ordinary functions
queued-count: Public generic functions
queued-count: Public generic functions

R
receive: Private ordinary functions
receive: Private ordinary functions
receive: Private generic functions
receive: Private generic functions
register-dispatcher: Public ordinary functions
register-new-dispatcher: Public ordinary functions
reply: Public ordinary functions
retrieve-keys: Public ordinary functions
retrieve-section: Public ordinary functions
retrieve-value: Public ordinary functions
routees: Public ordinary functions
running-p: Public ordinary functions

S
schedule-once: Public ordinary functions
schedule-recurring: Public ordinary functions
scheduler: Public generic functions
scheduler: Public generic functions
Setf Expander, (setf agent-elt): Public setf expanders
Setf Expander, (setf agent-gethash): Public setf expanders
shutdown: Public generic functions
shutdown: Public generic functions
shutdown: Public generic functions
shutdown-wheel-timer: Public ordinary functions
stash: Public ordinary functions
stashed-messages: Private generic functions
stashed-messages: Private generic functions
state: Public generic functions
state: Public generic functions
stay-on-state: Public macros
stop: Public ordinary functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop: Public generic functions
stop-children: Private ordinary functions
strategy-fun: Public generic functions
strategy-fun: Public generic functions
submit: Public generic functions
submit: Public generic functions
submit: Public generic functions
submit-message: Private ordinary functions
submit/no-reply: Private ordinary functions
submit/reply: Private ordinary functions
subscribe: Public generic functions
subscribe: Public generic functions
subscribe: Public generic functions
subscribe: Public generic functions
subscribers: Private generic functions
subscribers: Private generic functions
subscribers-for: Private ordinary functions
system: Public generic functions
system: Public generic functions
system: Public generic functions

T
task-async: Public ordinary functions
task-async-stream: Public ordinary functions
task-await: Public ordinary functions
task-shutdown: Public ordinary functions
task-start: Public ordinary functions
task-yield: Public ordinary functions
tell: Public generic functions
tell: Public generic functions
tell: Public generic functions
timeout-timer: Private generic functions
timeout-timer: Private generic functions
timeouts: Private generic functions
timeouts: Private generic functions
timer-hash: Private generic functions
timer-hash: Private generic functions

U
unbecome: Public generic functions
unbecome: Public generic functions
unstash-all: Public ordinary functions
unsubscribe: Public generic functions
unsubscribe: Public generic functions
unsubscribe: Public generic functions
unsubscribe: Public generic functions
unwatch: Public generic functions
unwatch: Public generic functions
user-actor-context: Private generic functions
user-actor-context: Private generic functions

W
wait-and-probe-for-msg-handler-result: Private ordinary functions
wait-cond: Public ordinary functions
wait-time: Private generic functions
wait-time: Private generic functions
watch: Public generic functions
watch: Public generic functions
watchers: Public generic functions
watchers: Public generic functions
wheel: Private generic functions
wheel: Private generic functions
when-state: Public macros
when-unhandled: Public macros
with-context: Public macros
with-fut: Public macros
with-fut-resolve: Public macros
with-get-handler: Public macros
with-sender: Private macros
with-update-handler: Public macros
with-waitfor: Public macros
with-waiting-actor: Private macros
workers: Public generic functions
workers: Public generic functions


A.3 Variables

Jump to:   *  
A   B   C   D   E   F   H   I   L   M   N   O   P   Q   R   S   T   U   W  
Index Entry  Section

*
*current-state*: Private special variables
*default-config*: Public special variables
*event-data*: Public special variables
*event-was-handled-by-goto*: Private special variables
*event-was-handled-by-stay*: Private special variables
*next-state-data*: Public special variables
*received-event*: Public special variables
*self*: Public special variables
*self*: Public symbol macros
*sender*: Public special variables
*sender*: Public symbol macros
*state*: Public special variables
*state*: Public symbol macros
*state-data*: Public special variables
*task-context*: Public special variables
*task-dispatcher*: Public special variables
*the-int*: Private special variables
*the-ref*: Private special variables

A
actors: Public classes

B
behavior: Public classes

C
cancelled-p: Private structures
cancelled-p: Private structures
cause: Public conditions
cell: Private structures
cell: Private structures
config: Public classes
context: Public classes
context: Public classes
cvar: Public classes
cvar: Public classes

D
data: Private structures
destroy-fun: Public classes
dispatcher: Public classes
dispatchers: Public classes

E
err-fun: Public structures
ev-actor: Public classes
event-handling-fun: Public classes
eventstream: Public classes

F
fill-count: Public classes

H
handler-fun-args: Private structures
handler-fun-args: Private structures
handler-result: Private structures
handler-result: Private structures
head: Private structures

I
id: Public classes
identifier: Public classes
init-fun: Public classes
internal-actor-context: Public classes
internal-state: Public classes

L
lock: Public classes
lock: Public classes
lock: Public classes

M
max-items: Public classes
max-queue-size: Private classes
message: Private structures
message: Private structures
msgbox: Public classes

N
name: Public conditions
name: Public classes
name: Private classes

O
object: Public structures

P
processed-messages: Private classes
promise: Public classes

Q
queue: Public conditions
queue: Public classes
queue: Public classes
queue: Private classes
queue-thread: Public classes

R
receive: Public classes
routees: Public classes
router: Public classes
running: Private structures

S
scheduler: Public classes
should-run: Private classes
Slot, actors: Public classes
Slot, behavior: Public classes
Slot, cancelled-p: Private structures
Slot, cancelled-p: Private structures
Slot, cause: Public conditions
Slot, cell: Private structures
Slot, cell: Private structures
Slot, config: Public classes
Slot, context: Public classes
Slot, context: Public classes
Slot, cvar: Public classes
Slot, cvar: Public classes
Slot, data: Private structures
Slot, destroy-fun: Public classes
Slot, dispatcher: Public classes
Slot, dispatchers: Public classes
Slot, err-fun: Public structures
Slot, ev-actor: Public classes
Slot, event-handling-fun: Public classes
Slot, eventstream: Public classes
Slot, fill-count: Public classes
Slot, handler-fun-args: Private structures
Slot, handler-fun-args: Private structures
Slot, handler-result: Private structures
Slot, handler-result: Private structures
Slot, head: Private structures
Slot, id: Public classes
Slot, identifier: Public classes
Slot, init-fun: Public classes
Slot, internal-actor-context: Public classes
Slot, internal-state: Public classes
Slot, lock: Public classes
Slot, lock: Public classes
Slot, lock: Public classes
Slot, max-items: Public classes
Slot, max-queue-size: Private classes
Slot, message: Private structures
Slot, message: Private structures
Slot, msgbox: Public classes
Slot, name: Public conditions
Slot, name: Public classes
Slot, name: Private classes
Slot, object: Public structures
Slot, processed-messages: Private classes
Slot, promise: Public classes
Slot, queue: Public conditions
Slot, queue: Public classes
Slot, queue: Public classes
Slot, queue: Private classes
Slot, queue-thread: Public classes
Slot, receive: Public classes
Slot, routees: Public classes
Slot, router: Public classes
Slot, running: Private structures
Slot, scheduler: Public classes
Slot, should-run: Private classes
Slot, stashed-messages: Public classes
Slot, state: Public classes
Slot, state: Private structures
Slot, strategy-fun: Public classes
Slot, subscribers: Public classes
Slot, system: Public classes
Slot, tail: Private structures
Slot, time-out: Private structures
Slot, time-out: Private structures
Slot, timeout-timer: Public classes
Slot, timeouts: Public classes
Slot, timer-hash: Public classes
Slot, user-actor-context: Public classes
Slot, wait-time: Public conditions
Slot, watchers: Public classes
Slot, wheel: Public classes
Slot, withreply-cvar: Private structures
Slot, withreply-lock: Private structures
Slot, withreply-p: Private structures
Special Variable, *current-state*: Private special variables
Special Variable, *default-config*: Public special variables
Special Variable, *event-data*: Public special variables
Special Variable, *event-was-handled-by-goto*: Private special variables
Special Variable, *event-was-handled-by-stay*: Private special variables
Special Variable, *next-state-data*: Public special variables
Special Variable, *received-event*: Public special variables
Special Variable, *self*: Public special variables
Special Variable, *sender*: Public special variables
Special Variable, *state*: Public special variables
Special Variable, *state-data*: Public special variables
Special Variable, *task-context*: Public special variables
Special Variable, *task-dispatcher*: Public special variables
Special Variable, *the-int*: Private special variables
Special Variable, *the-ref*: Private special variables
stashed-messages: Public classes
state: Public classes
state: Private structures
strategy-fun: Public classes
subscribers: Public classes
Symbol Macro, *self*: Public symbol macros
Symbol Macro, *sender*: Public symbol macros
Symbol Macro, *state*: Public symbol macros
system: Public classes

T
tail: Private structures
time-out: Private structures
time-out: Private structures
timeout-timer: Public classes
timeouts: Public classes
timer-hash: Public classes

U
user-actor-context: Public classes

W
wait-time: Public conditions
watchers: Public classes
wheel: Public classes
withreply-cvar: Private structures
withreply-lock: Private structures
withreply-p: Private structures


A.4 Data types

Jump to:   A   C   D   E   F   H   M   P   Q   R   S   T   W  
Index Entry  Section

A
actor: Public classes
actor-api.lisp: The sento/src/actor-api․lisp file
actor-cell: Public classes
actor-cell-state: Private structures
actor-cell.lisp: The sento/src/actor-cell․lisp file
actor-context: Public classes
actor-context-api.lisp: The sento/src/actor-context-api․lisp file
actor-context.lisp: The sento/src/actor-context․lisp file
actor-name-exists: Public conditions
actor-system: Public classes
actor-system-api.lisp: The sento/src/actor-system-api․lisp file
actor-system.lisp: The sento/src/actor-system․lisp file
actor.lisp: The sento/src/actor․lisp file
agent: Public classes
agent-usecase: The sento/src/agent-usecase module
agent-usecase-commons.lisp: The sento/src/agent-usecase/agent-usecase-commons․lisp file
agent.lisp: The sento/src/agent․lisp file
array-agent.lisp: The sento/src/agent-usecase/array-agent․lisp file
ask-timeout: Public conditions
async-waitor-actor: Private classes
atomic: The sento/src/atomic module
atomic-api.lisp: The sento/src/atomic/atomic-api․lisp file
atomic-integer: Private structures
atomic-reference: Private structures
atomic.lisp: The sento/src/atomic/atomic․lisp file

C
Class, actor: Public classes
Class, actor-cell: Public classes
Class, actor-context: Public classes
Class, actor-system: Public classes
Class, agent: Public classes
Class, async-waitor-actor: Private classes
Class, dispatch-worker: Public classes
Class, dispatcher-base: Public classes
Class, eventstream: Public classes
Class, fsm: Public classes
Class, future: Public classes
Class, message-box-base: Private classes
Class, message-box/bt: Public classes
Class, message-box/dp: Public classes
Class, queue-base: Private classes
Class, queue-bounded: Public classes
Class, queue-unbounded: Public classes
Class, router: Public classes
Class, shared-dispatcher: Public classes
Class, stashing: Public classes
Class, task: Public classes
Class, wheel-timer: Public classes
Condition, actor-name-exists: Public conditions
Condition, ask-timeout: Public conditions
Condition, queue-full-error: Public conditions
config.lisp: The sento/src/config․lisp file

D
dispatch-worker: Public classes
dispatcher-api.lisp: The sento/src/dispatcher-api․lisp file
dispatcher-base: Public classes
dispatcher.lisp: The sento/src/dispatcher․lisp file

E
eventstream: Public classes
eventstream-api.lisp: The sento/src/eventstream-api․lisp file
eventstream.lisp: The sento/src/eventstream․lisp file

F
fasync-completed.lisp: The sento/src/fasync-completed․lisp file
fcomputation.lisp: The sento/src/fcomputation․lisp file
File, actor-api.lisp: The sento/src/actor-api․lisp file
File, actor-cell.lisp: The sento/src/actor-cell․lisp file
File, actor-context-api.lisp: The sento/src/actor-context-api․lisp file
File, actor-context.lisp: The sento/src/actor-context․lisp file
File, actor-system-api.lisp: The sento/src/actor-system-api․lisp file
File, actor-system.lisp: The sento/src/actor-system․lisp file
File, actor.lisp: The sento/src/actor․lisp file
File, agent-usecase-commons.lisp: The sento/src/agent-usecase/agent-usecase-commons․lisp file
File, agent.lisp: The sento/src/agent․lisp file
File, array-agent.lisp: The sento/src/agent-usecase/array-agent․lisp file
File, atomic-api.lisp: The sento/src/atomic/atomic-api․lisp file
File, atomic.lisp: The sento/src/atomic/atomic․lisp file
File, config.lisp: The sento/src/config․lisp file
File, dispatcher-api.lisp: The sento/src/dispatcher-api․lisp file
File, dispatcher.lisp: The sento/src/dispatcher․lisp file
File, eventstream-api.lisp: The sento/src/eventstream-api․lisp file
File, eventstream.lisp: The sento/src/eventstream․lisp file
File, fasync-completed.lisp: The sento/src/fasync-completed․lisp file
File, fcomputation.lisp: The sento/src/fcomputation․lisp file
File, fsm.lisp: The sento/src/fsm․lisp file
File, hash-agent.lisp: The sento/src/agent-usecase/hash-agent․lisp file
File, message-box.lisp: The sento/src/mbox/message-box․lisp file
File, miscutils.lisp: The sento/src/miscutils․lisp file
File, package.lisp: The sento/src/package․lisp file
File, queue-locked.lisp: The sento/src/queue/queue-locked․lisp file
File, queue.lisp: The sento/src/queue/queue․lisp file
File, router.lisp: The sento/src/router․lisp file
File, sento.asd: The sento/sento․asd file
File, stash.lisp: The sento/src/stash․lisp file
File, tasks.lisp: The sento/src/tasks․lisp file
File, timeutils.lisp: The sento/src/timeutils․lisp file
File, wheel-timer.lisp: The sento/src/wheel-timer․lisp file
fsm: Public classes
fsm-state: Private structures
fsm.lisp: The sento/src/fsm․lisp file
future: Public classes

H
hash-agent.lisp: The sento/src/agent-usecase/hash-agent․lisp file

M
mbox: The sento/src/mbox module
message-box-base: Private classes
message-box.lisp: The sento/src/mbox/message-box․lisp file
message-box/bt: Public classes
message-box/dp: Public classes
message-item/bt: Private structures
message-item/dp: Private structures
miscutils.lisp: The sento/src/miscutils․lisp file
model: Public structures
Module, agent-usecase: The sento/src/agent-usecase module
Module, atomic: The sento/src/atomic module
Module, mbox: The sento/src/mbox module
Module, queue: The sento/src/queue module
Module, src: The sento/src module

P
Package, sento.actor: The sento․actor package
Package, sento.actor-cell: The sento․actor-cell package
Package, sento.actor-context: The sento․actor-context package
Package, sento.actor-system: The sento․actor-system package
Package, sento.agent: The sento․agent package
Package, sento.agent.array: The sento․agent․array package
Package, sento.agent.hash: The sento․agent․hash package
Package, sento.agent.usecase-commons: The sento․agent․usecase-commons package
Package, sento.async-future: The sento․async-future package
Package, sento.atomic: The sento․atomic package
Package, sento.config: The sento․config package
Package, sento.dispatcher: The sento․dispatcher package
Package, sento.eventstream: The sento․eventstream package
Package, sento.fsm: The sento․fsm package
Package, sento.future: The sento․future package
Package, sento.messageb: The sento․messageb package
Package, sento.miscutils: The sento․miscutils package
Package, sento.queue: The sento․queue package
Package, sento.router: The sento․router package
Package, sento.stash: The sento․stash package
Package, sento.tasks: The sento․tasks package
Package, sento.timeutils: The sento․timeutils package
Package, sento.user: The sento․user package
Package, sento.wheel-timer: The sento․wheel-timer package
package.lisp: The sento/src/package․lisp file

Q
queue: The sento/src/queue module
queue: Private structures
queue-base: Private classes
queue-bounded: Public classes
queue-full-error: Public conditions
queue-locked.lisp: The sento/src/queue/queue-locked․lisp file
queue-unbounded: Public classes
queue.lisp: The sento/src/queue/queue․lisp file

R
router: Public classes
router.lisp: The sento/src/router․lisp file

S
sento: The sento system
sento.actor: The sento․actor package
sento.actor-cell: The sento․actor-cell package
sento.actor-context: The sento․actor-context package
sento.actor-system: The sento․actor-system package
sento.agent: The sento․agent package
sento.agent.array: The sento․agent․array package
sento.agent.hash: The sento․agent․hash package
sento.agent.usecase-commons: The sento․agent․usecase-commons package
sento.asd: The sento/sento․asd file
sento.async-future: The sento․async-future package
sento.atomic: The sento․atomic package
sento.config: The sento․config package
sento.dispatcher: The sento․dispatcher package
sento.eventstream: The sento․eventstream package
sento.fsm: The sento․fsm package
sento.future: The sento․future package
sento.messageb: The sento․messageb package
sento.miscutils: The sento․miscutils package
sento.queue: The sento․queue package
sento.router: The sento․router package
sento.stash: The sento․stash package
sento.tasks: The sento․tasks package
sento.timeutils: The sento․timeutils package
sento.user: The sento․user package
sento.wheel-timer: The sento․wheel-timer package
shared-dispatcher: Public classes
src: The sento/src module
stash.lisp: The sento/src/stash․lisp file
stashing: Public classes
Structure, actor-cell-state: Private structures
Structure, atomic-integer: Private structures
Structure, atomic-reference: Private structures
Structure, fsm-state: Private structures
Structure, message-item/bt: Private structures
Structure, message-item/dp: Private structures
Structure, model: Public structures
Structure, queue: Private structures
System, sento: The sento system

T
task: Public classes
tasks.lisp: The sento/src/tasks․lisp file
timeutils.lisp: The sento/src/timeutils․lisp file

W
wheel-timer: Public classes
wheel-timer.lisp: The sento/src/wheel-timer․lisp file