The sento Reference Manual

This is the sento Reference Manual, version 3.0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:04:08 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.0.3

Dependencies
  • alexandria (system).
  • log4cl (system).
  • bordeaux-threads (system).
  • jpl-queues (system).
  • str (system).
  • blackbird (system).
  • binding-arrows (system).
  • timer-wheel (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 Component

queue.lisp (file).


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
Internals

atomic-cas (generic function).


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/dispatcher-api.lisp

Dependency

miscutils.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.dispatcher.

Public Interface

4.1.9 sento/src/queue/queue.lisp

Source

sento.asd.

Parent Component

queue (module).

Packages

sento.queue.

Public Interface
Internals

queue-base (class).


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

Source

sento.asd.

Parent Component

mbox (module).

Packages

sento.messageb.

Public Interface
Internals

4.1.11 sento/src/actor-cell.lisp

Dependency

mbox (module).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.actor-cell.

Public Interface
Internals

4.1.12 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.13 sento/src/eventstream-api.lisp

Dependency

actor-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.eventstream.

Public Interface

4.1.14 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.15 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.16 sento/src/fcomputation.lisp

Dependency

actor-context-api.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.future.

Public Interface
Internals

4.1.17 sento/src/actor.lisp

Dependency

fcomputation.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.18 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.19 sento/src/eventstream.lisp

Dependency

agent.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.20 sento/src/tasks.lisp

Dependency

eventstream.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.tasks.

Public Interface
Internals

make-task (function).


4.1.21 sento/src/router.lisp

Dependency

tasks.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Packages

sento.router.

Public Interface
Internals

4.1.22 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.23 sento/src/dispatcher.lisp

Dependency

stash.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

receive (function).


4.1.24 sento/src/actor-context.lisp

Dependency

dispatcher.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.25 sento/src/actor-system.lisp

Dependency

actor-context.lisp (file).

Source

sento.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.26 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.27 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.28 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.29 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

queue-base (class).


5.5 sento.wheel-timer

Source

wheel-timer.lisp.

Nickname

wt

Use List

common-lisp.

Public Interface
Internals

5.6 sento.messageb

Source

message-box.lisp.

Nickname

mesgb

Use List
Public Interface
Internals

5.7 sento.stash

Source

stash.lisp.

Nickname

stash

Use List

common-lisp.

Public Interface
Internals

stashed-messages (generic reader).


5.8 sento.atomic

Source

atomic-api.lisp.

Nickname

atomic

Use List

common-lisp.

Public Interface
Internals

5.9 sento.agent.array

Source

array-agent.lisp.

Nickname

agtarray

Use List
Used By List

sento.user.

Public Interface
Internals

agent-set (function).


5.11 sento.agent.hash

Source

hash-agent.lisp.

Nickname

agthash

Use List
Used By List

sento.user.

Public Interface
Internals

agent-puthash (function).


5.12 sento.router

Source

router.lisp.

Nickname

router

Use List

common-lisp.

Public Interface
Internals

5.13 sento.miscutils

Source

miscutils.lisp.

Nickname

miscutils

Use List

common-lisp.

Public Interface

5.14 sento.agent.usecase-commons

Source

agent-usecase-commons.lisp.

Nickname

agent.usecase-commons

Use List

common-lisp.

Used By List
Public Interface
Internals

5.15 sento.future

Source

fcomputation.lisp.

Nickname

future

Use List
  • blackbird.
  • common-lisp.
Used By List

sento.user.

Public Interface
Internals

5.16 sento.actor-system

Source

actor-system-api.lisp.

Nickname

asys

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.17 sento.eventstream

Source

eventstream-api.lisp.

Nickname

ev

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.18 sento.tasks

Source

tasks.lisp.

Nickname

tasks

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

make-task (function).


5.19 sento.actor-cell

Source

actor-cell.lisp.

Nickname

act-cell

Use List

common-lisp.

Public Interface
Internals

5.20 sento.actor

Source

actor-api.lisp.

Nickname

act

Use List

common-lisp.

Used By List
Public Interface
Internals

5.21 sento.actor-context

Source

actor-context-api.lisp.

Nickname

ac

Use List

common-lisp.

Used By List

sento.user.

Public Interface
Internals

5.22 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: *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: *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: fcompleted (future (result) &body body)

Completion handler on the given ‘future‘.

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

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.

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: 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
(bt:make-thread
(lambda ()
(fresolve (do-some-lengthy-calculation)))))
“‘

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 bt:timeout.

Package

sento.actor-cell.

Source

actor-cell.lisp.

Function: cancel (wheel-timer timer)

Cancels a timer.
‘wheel-timer‘ is the ‘wt:wheel-timer‘ instance. ‘timer‘ is the timer object returned by ‘wt:schedule‘.

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: 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: 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-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)))
(bt: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 ‘wheel-timer‘.

‘config‘ is a parameter for a list of key parameters including: ‘:resolution‘: the timer time resolution in milliseconds. ‘:max-size‘: the maximum size of timer functions this wheel can handle.

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 (wheel-timer delay timer-fun)

Schedule a function execution:

‘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‘.

returns: a timer object that can be used to cancel the timer.

Package

sento.wheel-timer.

Source

wheel-timer.lisp.

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

Shuts down the wheel timer and frees 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.

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 other-args)

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 3-arity lambda with arguments: 1. the actor, 2. the message, 3. the state
Usually expressed as ‘(lambda (self msg state))‘.
- ‘: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 are ‘:shared‘ (default) and ‘:pinned‘.
- ‘: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.
- ‘:other-args‘ are in the actor instance as ‘other-init-args‘ and can be acted upon in i.e. ‘pre-start‘ for additional initialization.

Package

sento.actor-context.

Source

actor-context-api.lisp.

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

See ‘ac:actor-of‘

Source

actor-system.lisp.

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

See ‘ac:actor-of‘.

Source

actor-context.lisp.

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

‘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-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.

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-bounded))
Method: emptyq-p ((self queue-unbounded))
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 other-init-args)

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.

- ‘other-init-args‘: are additional arguments passed to ‘initialize-instance‘ of the actor class.

Package

sento.actor.

Source

actor-api.lisp.

Methods
Method: make-actor (receive &key name state type init destroy other-init-args)
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 Reader: other-init-args (object)
Package

sento.actor.

Methods
Reader Method: other-init-args ((actor actor))

Other init args passed to ‘make-actor‘

Source

actor-api.lisp.

Target Slot

other-init-args.

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-bounded))
Method: popq ((self queue-unbounded))
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-bounded) element)
Method: pushq ((self queue-unbounded) element)
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)
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 gracefully.
This is not an immediate stop.
There are two ways to stop an actor (cell).

1. by calling this function.
It is not an immediate stop. The actor will finish the current message processing. ‘wait‘: waits until the cell is stopped.

2. 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.

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 Reader: system (object)
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.

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 Reader: timeout-timer (object)
Package

sento.actor-system.

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

A wheel-timer used for timeouts to make timeouts less resource expensive.

Source

actor-system.lisp.

Target Slot

timeout-timer.

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.


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: other-init-args

Other init args passed to ‘make-actor‘

Initargs

:other-init-args

Readers

other-init-args.

Writers

This slot is read-only.

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‘.

Or even simpler via ‘act:actor-of‘ which is a convenience macro:

“‘elisp
(act:actor-of (*system*)
(lambda (msg)
;; do stuff))
“‘

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: eventstream

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

Readers

evstream.

Writers

This slot is read-only.

Slot: timeout-timer

A wheel-timer used for timeouts to make timeouts less resource expensive.

Readers

timeout-timer.

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: 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.

Slot: should-run

Flag that indicates whether the message processing should commence.

Initform

t

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

(bordeaux-threads:make-lock)

Class: queue-bounded

Bounded queue.

Package

sento.queue.

Source

queue.lisp.

Direct superclasses

queue-base.

Direct methods
Direct slots
Slot: queue
Slot: max-items
Initargs

:max-items

Class: queue-unbounded

Unbounded queue.

Package

sento.queue.

Source

queue.lisp.

Direct superclasses

queue-base.

Direct methods
Direct slots
Slot: queue
Initform

(make-instance (quote jpl-queues:synchronized-queue) :queue (make-instance (quote jpl-queues:unbounded-fifo-queue)))

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.

Readers

wheel.

Writers

(setf wheel).


6.2 Internals


6.2.1 Special variables

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 &key receive init destroy dispatcher state type name context-key other-args)

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-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: %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-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: %triggered-stop-fun (msg self)
Package

sento.messageb.

Source

message-box.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.

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-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: 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: 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.

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-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-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.

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 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 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: 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: 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: 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.

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: 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).


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 ‘act:actor-of‘ or ‘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: 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
Direct slots
Slot: queue

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   !   %   (   ?  
A   B   C   D   E   F   G   H   I   M   N   O   P   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-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
%register-config: Private ordinary functions
%register-dispatchers: Private ordinary functions
%register-eventstream: Private ordinary functions
%register-timeout-timer: Private ordinary functions
%remove-actor: Private ordinary functions
%triggered-stop-fun: 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 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 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: Private generic functions
atomic-cas: Private generic functions
atomic-cas: Private 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-message-item/bt: Private ordinary functions
copy-message-item/dp: Private ordinary functions
copy-model: Private ordinary functions

D
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
emptyq-p: Public generic functions
emptyq-p: Public generic functions
emptyq-p: Public generic functions
ev-receive: Private ordinary functions
evstream: Public generic functions
evstream: Public generic functions

F
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
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-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, %register-config: Private ordinary functions
Function, %register-dispatchers: Private ordinary functions
Function, %register-eventstream: Private ordinary functions
Function, %register-timeout-timer: Private ordinary functions
Function, %remove-actor: Private ordinary functions
Function, %triggered-stop-fun: 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 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, 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-message-item/bt: Private ordinary functions
Function, copy-message-item/dp: Private ordinary functions
Function, copy-model: 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, ev-receive: Private ordinary functions
Function, filter: Public ordinary functions
Function, finalize-initialization: Private ordinary functions
Function, fresult: Public ordinary functions
Function, futurep: 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-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-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, 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: 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 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: Private 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, 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, other-init-args: 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, receive: Private 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: Public 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-strategy-fun: Private ordinary functions
get-strategy-index: Private ordinary functions

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, fcompleted: Public macros
Macro, fmap: Public macros
Macro, frecover: 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-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-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 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: Private generic functions
Method, atomic-cas: Private 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, 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, other-init-args: 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, receive: Private 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, tell: Public generic functions
Method, tell: Public generic functions
Method, timeout-timer: Public 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
other-init-args: Public generic functions
other-init-args: Public generic functions

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

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: Public ordinary 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
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

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: Public generic functions
timeout-timer: Public 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
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   H   I   L   M   N   O   P   Q   R   S   T   U   W  
Index Entry  Section

*
*default-config*: 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
*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

D
destroy-fun: Public classes
dispatcher: Public classes
dispatchers: Public classes

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

H
handler-fun-args: Private structures
handler-fun-args: Private structures
handler-result: Private structures
handler-result: 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

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
other-init-args: Public classes

P
processed-messages: Private classes
promise: Public classes

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

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

S
should-run: Public 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, destroy-fun: Public classes
Slot, dispatcher: Public classes
Slot, dispatchers: Public classes
Slot, err-fun: Public structures
Slot, ev-actor: Public classes
Slot, eventstream: 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, 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, 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, other-init-args: Public classes
Slot, processed-messages: Private classes
Slot, promise: Public classes
Slot, queue: Public classes
Slot, queue: Public classes
Slot, queue: Private 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, should-run: Public classes
Slot, stashed-messages: Public classes
Slot, state: Public classes
Slot, strategy-fun: Public classes
Slot, subscribers: Public classes
Slot, system: Public classes
Slot, time-out: Private structures
Slot, time-out: Private structures
Slot, timeout-timer: 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, *default-config*: Public special variables
Special Variable, *self*: Public special variables
Special Variable, *sender*: Public special variables
Special Variable, *state*: 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
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
time-out: Private structures
time-out: Private structures
timeout-timer: 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, 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
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
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, fcomputation.lisp: The sento/src/fcomputation․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.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
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.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.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-base: Private classes
queue-bounded: Public classes
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.atomic: The sento․atomic package
sento.config: The sento․config package
sento.dispatcher: The sento․dispatcher package
sento.eventstream: The sento․eventstream 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, message-item/bt: Private structures
Structure, message-item/dp: Private structures
Structure, model: Public 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