The simple-flow-dispatcher Reference Manual

Table of Contents

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

The simple-flow-dispatcher Reference Manual

This is the simple-flow-dispatcher Reference Manual, version 1.0.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:34:39 2018 GMT+0.


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

1 Introduction

simple-flow-dispatcher

Simple implementation of a flow dispatcher for cl-flow library. Handles invariants correctly, but doesn't accept any additional parameters.


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

2 Systems

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


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

2.1 simple-flow-dispatcher

Author

Pavel Korolev

Contact

dev@borodust.org

License

MIT

Description

Reference implementation of a dispatcher for cl-flow library

Version

1.0.0

Dependencies
Source

simple-flow-dispatcher.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 simple-flow-dispatcher.asd

Location

simple-flow-dispatcher.asd

Systems

simple-flow-dispatcher (system)


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

3.1.2 simple-flow-dispatcher/packages.lisp

Parent

simple-flow-dispatcher (system)

Location

packages.lisp

Packages

simple-flow-dispatcher


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

3.1.3 simple-flow-dispatcher/atomic.lisp

Dependency

packages.lisp (file)

Parent

simple-flow-dispatcher (system)

Location

atomic.lisp

Internal Definitions

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

3.1.4 simple-flow-dispatcher/dispatcher.lisp

Dependency

atomic.lisp (file)

Parent

simple-flow-dispatcher (system)

Location

dispatcher.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 simple-flow-dispatcher

Source

packages.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Functions

Function: free-simple-dispatcher SIMPLE-DISPATCHER

Release resources acquired by the dispatcher

Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

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 (file)


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

5.2 Internal definitions


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

5.2.1 Constants

Constant: +cas-sleep+
Package

simple-flow-dispatcher

Source

atomic.lisp (file)


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

5.2.2 Special variables

Special Variable: *dispatcher*
Package

simple-flow-dispatcher


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

5.2.3 Macros

Macro: %compare-and-swap PLACE OLD NEW

Tries to atomically set a value of PLACE to be NEW if it was EQ to OLD, returning non-nil if successful.

Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Macro: with-spin-lock-held (SPIN-LOCK) &body BODY
Package

simple-flow-dispatcher

Source

atomic.lisp (file)


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

5.2.4 Functions

Function: acquire-spin-lock SPIN-LOCK
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Function: clear-tagged-queue QUEUE
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: copy-spin-lock INSTANCE
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Function: dispatch-with DISPATCHER FN INVARIANT PRIORITY IGNORE-INVARIANT
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: invoke-directly FN
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: make-spin-lock &key (OWNED OWNED)
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Function: peek-task QUEUE TAG
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: pop-task QUEUE TAG
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: push-task QUEUE TAG TASK
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: release-spin-lock SPIN-LOCK
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Function: simple-dispatcher-instance-alive-p SIMPLE-DISPATCHER-INSTANCE
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Function: spin-lock-owned INSTANCE
Function: (setf spin-lock-owned) VALUE INSTANCE
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Function: spin-lock-p OBJECT
Package

simple-flow-dispatcher

Source

atomic.lisp (file)


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

5.2.5 Structures

Structure: spin-lock ()
Package

simple-flow-dispatcher

Source

atomic.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: owned
Readers

spin-lock-owned (function)

Writers

(setf spin-lock-owned) (function)


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

5.2.6 Classes

Class: simple-dispatcher ()
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

initialize-instance (method)

Direct slots
Slot: tasks
Initform

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

Slot: error-handler
Initargs

:error-handler

Slot: invoker
Initargs

:invoker

Initform

(error ":invoker missing")

Slot: pool
Class: tagged-queue ()
Package

simple-flow-dispatcher

Source

dispatcher.lisp (file)

Direct superclasses

standard-object (class)

Direct slots
Slot: lock
Initform

(simple-flow-dispatcher::make-spin-lock)

Slot: queue-table
Initform

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


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, simple-flow-dispatcher.asd: The simple-flow-dispatcher<dot>asd file
File, Lisp, simple-flow-dispatcher/atomic.lisp: The simple-flow-dispatcher/atomic<dot>lisp file
File, Lisp, simple-flow-dispatcher/dispatcher.lisp: The simple-flow-dispatcher/dispatcher<dot>lisp file
File, Lisp, simple-flow-dispatcher/packages.lisp: The simple-flow-dispatcher/packages<dot>lisp file

L
Lisp File, simple-flow-dispatcher.asd: The simple-flow-dispatcher<dot>asd file
Lisp File, simple-flow-dispatcher/atomic.lisp: The simple-flow-dispatcher/atomic<dot>lisp file
Lisp File, simple-flow-dispatcher/dispatcher.lisp: The simple-flow-dispatcher/dispatcher<dot>lisp file
Lisp File, simple-flow-dispatcher/packages.lisp: The simple-flow-dispatcher/packages<dot>lisp file

S
simple-flow-dispatcher.asd: The simple-flow-dispatcher<dot>asd file
simple-flow-dispatcher/atomic.lisp: The simple-flow-dispatcher/atomic<dot>lisp file
simple-flow-dispatcher/dispatcher.lisp: The simple-flow-dispatcher/dispatcher<dot>lisp file
simple-flow-dispatcher/packages.lisp: The simple-flow-dispatcher/packages<dot>lisp file

Jump to:   F   L   S  

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

A.2 Functions

Jump to:   %   (  
A   C   D   F   I   M   P   R   S   W  
Index Entry  Section

%
%compare-and-swap: Internal macros

(
(setf spin-lock-owned): Internal functions

A
acquire-spin-lock: Internal functions

C
clear-tagged-queue: Internal functions
copy-spin-lock: Internal functions

D
dispatch-with: Internal functions

F
free-simple-dispatcher: Exported functions
Function, (setf spin-lock-owned): Internal functions
Function, acquire-spin-lock: Internal functions
Function, clear-tagged-queue: Internal functions
Function, copy-spin-lock: Internal functions
Function, dispatch-with: Internal functions
Function, free-simple-dispatcher: Exported functions
Function, invoke-directly: Internal functions
Function, make-simple-dispatcher: Exported functions
Function, make-spin-lock: Internal functions
Function, peek-task: Internal functions
Function, pop-task: Internal functions
Function, push-task: Internal functions
Function, release-spin-lock: Internal functions
Function, simple-dispatcher-instance-alive-p: Internal functions
Function, spin-lock-owned: Internal functions
Function, spin-lock-p: Internal functions

I
invoke-directly: Internal functions

M
Macro, %compare-and-swap: Internal macros
Macro, with-spin-lock-held: Internal macros
make-simple-dispatcher: Exported functions
make-spin-lock: Internal functions

P
peek-task: Internal functions
pop-task: Internal functions
push-task: Internal functions

R
release-spin-lock: Internal functions

S
simple-dispatcher-instance-alive-p: Internal functions
spin-lock-owned: Internal functions
spin-lock-p: Internal functions

W
with-spin-lock-held: Internal macros

Jump to:   %   (  
A   C   D   F   I   M   P   R   S   W  

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

A.3 Variables

Jump to:   *   +  
C   E   I   L   O   P   Q   S   T  
Index Entry  Section

*
*dispatcher*: Internal special variables

+
+cas-sleep+: Internal constants

C
Constant, +cas-sleep+: Internal constants

E
error-handler: Internal classes

I
invoker: Internal classes

L
lock: Internal classes

O
owned: Internal structures

P
pool: Internal classes

Q
queue-table: Internal classes

S
Slot, error-handler: Internal classes
Slot, invoker: Internal classes
Slot, lock: Internal classes
Slot, owned: Internal structures
Slot, pool: Internal classes
Slot, queue-table: Internal classes
Slot, tasks: Internal classes
Special Variable, *dispatcher*: Internal special variables

T
tasks: Internal classes

Jump to:   *   +  
C   E   I   L   O   P   Q   S   T  

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

A.4 Data types

Jump to:   C   P   S   T  
Index Entry  Section

C
Class, simple-dispatcher: Internal classes
Class, tagged-queue: Internal classes

P
Package, simple-flow-dispatcher: The simple-flow-dispatcher package

S
simple-dispatcher: Internal classes
simple-flow-dispatcher: The simple-flow-dispatcher system
simple-flow-dispatcher: The simple-flow-dispatcher package
spin-lock: Internal structures
Structure, spin-lock: Internal structures
System, simple-flow-dispatcher: The simple-flow-dispatcher system

T
tagged-queue: Internal classes

Jump to:   C   P   S   T