The simple-flow-dispatcher Reference Manual

This is the simple-flow-dispatcher Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 19:34:39 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 simple-flow-dispatcher

Reference implementation of a dispatcher for cl-flow library

Author

Pavel Korolev

Contact

License

MIT

Version

1.0.0

Dependencies
  • alexandria (system).
  • cl-muth (system).
  • bodge-queue (system).
Source

simple-flow-dispatcher.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 simple-flow-dispatcher/simple-flow-dispatcher.asd

Source

simple-flow-dispatcher.asd.

Parent Component

simple-flow-dispatcher (system).

ASDF Systems

simple-flow-dispatcher.


3.1.2 simple-flow-dispatcher/packages.lisp

Source

simple-flow-dispatcher.asd.

Parent Component

simple-flow-dispatcher (system).

Packages

simple-flow-dispatcher.


3.1.3 simple-flow-dispatcher/dispatcher.lisp

Dependency

packages.lisp (file).

Source

simple-flow-dispatcher.asd.

Parent Component

simple-flow-dispatcher (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 simple-flow-dispatcher

Source

packages.lisp.

Use List
  • alexandria.
  • bodge-queue.
  • common-lisp.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Ordinary functions

Function: free-simple-dispatcher (simple-dispatcher)

Release resources acquired by the dispatcher

Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: make-simple-dispatcher (&key threads error-handler invoker)

Makes simple thread-safe cl-flow dispatcher that can handle single invariants. For invariants to be considered the same they must be EQ. For example:

(-> :guarded ()
(do-some-work))

While this flow block is running other blocks with the same invariant (EQ to :guarded) will never be executed concurrently.

Package

simple-flow-dispatcher.

Source

dispatcher.lisp.


5.1.2 Standalone methods

Method: initialize-instance :after ((this simple-dispatcher) &key threads)
Source

dispatcher.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *dispatcher*
Package

simple-flow-dispatcher.


5.2.2 Ordinary functions

Function: clear-tagged-queue (queue)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: dispatch-with (dispatcher fn invariant priority ignore-invariant)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: invoke-directly (fn)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: peek-task (queue tag)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: pop-task (queue tag)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: push-task (queue tag task)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Function: simple-dispatcher-instance-alive-p (simple-dispatcher-instance)
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.


5.2.3 Classes

Class: simple-dispatcher
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Direct methods

initialize-instance.

Direct slots
Slot: tasks
Initform

(make-instance (quote simple-flow-dispatcher::tagged-queue))

Slot: error-handler
Initargs

:error-handler

Slot: invoker
Initform

(error ":invoker missing")

Initargs

:invoker

Slot: pool
Class: tagged-queue
Package

simple-flow-dispatcher.

Source

dispatcher.lisp.

Direct slots
Slot: lock
Initform

(cl-muth:make-spin-lock)

Slot: queue-table
Initform

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


Appendix A Indexes


A.1 Concepts