The cl-events Reference Manual

This is the cl-events Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:52:10 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-events

Events for Common Lisp

Maintainer

Ilya Khaprov <>

Author

Ilya Khaprov <>

License

MIT

Version

0.2

Dependencies
  • alexandria (system).
  • iterate (system).
  • log4cl (system).
  • lparallel (system).
  • blackbird (system).
Source

cl-events.asd.

Child Component

src (module).


3 Modules

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


3.1 cl-events/src

Source

cl-events.asd.

Parent Component

cl-events (system).

Child Components

3.2 cl-events/src/support

Dependency

package.lisp (file).

Source

cl-events.asd.

Parent Component

src (module).

Child Component

cas.lisp (file).


3.3 cl-events/src/executors

Dependency

support (module).

Source

cl-events.asd.

Parent Component

src (module).

Child Components

3.4 cl-events/src/sinks

Dependency

executors (module).

Source

cl-events.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 cl-events/cl-events.asd

Source

cl-events.asd.

Parent Component

cl-events (system).

ASDF Systems

cl-events.

Packages

cl-events.system.


4.1.2 cl-events/src/package.lisp

Source

cl-events.asd.

Parent Component

src (module).

Packages

cl-events.


4.1.3 cl-events/src/support/cas.lisp

Source

cl-events.asd.

Parent Component

support (module).

Internals

cas (macro).


4.1.4 cl-events/src/executors/base.lisp

Source

cl-events.asd.

Parent Component

executors (module).

Public Interface

invoke-executor (generic function).


4.1.5 cl-events/src/executors/serial-executor.lisp

Dependency

base.lisp (file).

Source

cl-events.asd.

Parent Component

executors (module).

Public Interface

4.1.6 cl-events/src/executors/chained-executor.lisp

Dependency

serial-executor.lisp (file).

Source

cl-events.asd.

Parent Component

executors (module).

Public Interface

4.1.7 cl-events/src/executors/threaded-executor.lisp

Dependency

chained-executor.lisp (file).

Source

cl-events.asd.

Parent Component

executors (module).

Public Interface

4.1.8 cl-events/src/executors/pooled-executor.lisp

Dependency

threaded-executor.lisp (file).

Source

cl-events.asd.

Parent Component

executors (module).

Public Interface
Internals

4.1.9 cl-events/src/sinks/base.lisp

Source

cl-events.asd.

Parent Component

sinks (module).

Public Interface

4.1.10 cl-events/src/sinks/single-thread-sink.lisp

Dependency

base.lisp (file).

Source

cl-events.asd.

Parent Component

sinks (module).

Public Interface
Internals

4.1.11 cl-events/src/sinks/multi-thread-sink.lisp

Dependency

single-thread-sink.lisp (file).

Source

cl-events.asd.

Parent Component

sinks (module).

Public Interface

4.1.12 cl-events/src/events.lisp

Dependency

sinks (module).

Source

cl-events.asd.

Parent Component

src (module).

Public Interface

4.1.13 cl-events/src/api.lisp

Dependency

events.lisp (file).

Source

cl-events.asd.

Parent Component

src (module).

Public Interface
Internals

make-once-handler (function).


5 Packages

Packages are listed by definition order.


5.1 cl-events.system

Source

cl-events.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 cl-events

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • iterate.
Public Interface
Internals

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: *thread-pool*
Package

cl-events.

Source

pooled-executor.lisp.


6.1.2 Ordinary functions

Function: event! (event &rest args)
Package

cl-events.

Source

api.lisp.

Function: event+ (event handler &rest args &key once)
Package

cl-events.

Source

api.lisp.

Function: event- (event tag)
Package

cl-events.

Source

api.lisp.

Function: event-handlers-list (event)
Package

cl-events.

Source

events.lisp.


6.1.3 Generic functions

Generic Function: add-event-handler (sink handler &key &allow-other-keys)
Package

cl-events.

Source

base.lisp.

Methods
Method: add-event-handler ((sink multi-thread-sink) handler &key &allow-other-keys)
Source

multi-thread-sink.lisp.

Method: add-event-handler ((sink single-thread-sink) handler &key &allow-other-keys)
Source

single-thread-sink.lisp.

Generic Function: invoke-event-handlers (event &rest args)
Package

cl-events.

Methods
Method: invoke-event-handlers (event &rest args)
Source

events.lisp.

Generic Function: invoke-executor (executor sink args)
Package

cl-events.

Source

base.lisp.

Methods
Method: invoke-executor ((executor (eql cl-events:pooled-executor)) sink args)
Source

pooled-executor.lisp.

Method: invoke-executor ((executor pooled-executor) sink args)
Source

pooled-executor.lisp.

Method: invoke-executor ((executor (eql cl-events:threaded-executor)) sink args)
Source

threaded-executor.lisp.

Method: invoke-executor ((executor threaded-executor) sink args)
Source

threaded-executor.lisp.

Method: invoke-executor ((executor (eql cl-events:chained-executor)) sink args)
Source

chained-executor.lisp.

Method: invoke-executor ((executor chained-executor) sink args)
Source

chained-executor.lisp.

Method: invoke-executor ((executor (eql cl-events:serial-executor)) sink args)
Source

serial-executor.lisp.

Method: invoke-executor ((executor serial-executor) sink args)
Source

serial-executor.lisp.

Generic Function: remove-event-handler (sink tag)
Package

cl-events.

Source

base.lisp.

Methods
Method: remove-event-handler ((sink multi-thread-sink) handler)
Source

multi-thread-sink.lisp.

Method: remove-event-handler ((sink single-thread-sink) handler)
Source

single-thread-sink.lisp.

Generic Function: sink-handlers-list (sink)
Package

cl-events.

Source

base.lisp.

Methods
Method: sink-handlers-list ((sink multi-thread-sink))
Source

multi-thread-sink.lisp.

Method: sink-handlers-list ((sink single-thread-sink))
Source

single-thread-sink.lisp.


6.1.4 Classes

Class: broadcast-event
Package

cl-events.

Source

events.lisp.

Direct superclasses
Class: chained-executor

Emulates serial-executor for non-blocking environments

Package

cl-events.

Source

chained-executor.lisp.

Direct subclasses

non-blocking-event.

Direct methods

invoke-executor.

Class: event
Package

cl-events.

Source

events.lisp.

Direct superclasses
Class: multi-thread-sink

Hanldlers added/removed possibly concurrently from many threads.

Package

cl-events.

Source

multi-thread-sink.lisp.

Direct superclasses

single-thread-sink.

Direct subclasses
Direct methods
Class: non-blocking-event
Package

cl-events.

Source

events.lisp.

Direct superclasses
Class: pooled-executor

Executes each event handler in lparallel thread pool

Package

cl-events.

Source

pooled-executor.lisp.

Direct subclasses

broadcast-event.

Direct methods

invoke-executor.

Class: serial-executor

Iterates over sink content and executes event handlers one after another

Package

cl-events.

Source

serial-executor.lisp.

Direct subclasses
Direct methods

invoke-executor.

Class: simple-event
Package

cl-events.

Source

events.lisp.

Direct superclasses
Class: single-thread-sink

eventhandlers added/removed in single-threaded context.

Package

cl-events.

Source

single-thread-sink.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: handlers
Initform

(list)

Readers

sink-handlers.

Writers

(setf sink-handlers).

Slot: copy
Initform

(list)

Readers

sink-handlers-copy.

Writers

(setf sink-handlers-copy).

Class: threaded-executor

Executes each event handler in newly created thread

Package

cl-events.

Source

threaded-executor.lisp.

Direct methods

invoke-executor.


6.2 Internals


6.2.1 Macros

Macro: cas (place old new)
Package

cl-events.

Source

cas.lisp.


6.2.2 Ordinary functions

Function: execute-in-thread-pool (handler args)
Package

cl-events.

Source

pooled-executor.lisp.

Function: get-thread-pool ()
Package

cl-events.

Source

pooled-executor.lisp.

Function: make-once-handler (event handler)
Package

cl-events.

Source

api.lisp.


6.2.3 Generic functions

Generic Reader: sink-handlers (object)
Package

cl-events.

Methods
Reader Method: sink-handlers ((single-thread-sink single-thread-sink))

automatically generated reader method

Source

single-thread-sink.lisp.

Target Slot

handlers.

Generic Writer: (setf sink-handlers) (object)
Package

cl-events.

Methods
Writer Method: (setf sink-handlers) ((single-thread-sink single-thread-sink))

automatically generated writer method

Source

single-thread-sink.lisp.

Target Slot

handlers.

Generic Reader: sink-handlers-copy (object)
Package

cl-events.

Methods
Reader Method: sink-handlers-copy ((single-thread-sink single-thread-sink))

automatically generated reader method

Source

single-thread-sink.lisp.

Target Slot

copy.

Generic Writer: (setf sink-handlers-copy) (object)
Package

cl-events.

Methods
Writer Method: (setf sink-handlers-copy) ((single-thread-sink single-thread-sink))

automatically generated writer method

Source

single-thread-sink.lisp.

Target Slot

copy.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   E   F   G   I   M   R   S  
Index Entry  Section

(
(setf sink-handlers): Private generic functions
(setf sink-handlers): Private generic functions
(setf sink-handlers-copy): Private generic functions
(setf sink-handlers-copy): Private generic functions

A
add-event-handler: Public generic functions
add-event-handler: Public generic functions
add-event-handler: Public generic functions

C
cas: Private macros

E
event!: Public ordinary functions
event+: Public ordinary functions
event-: Public ordinary functions
event-handlers-list: Public ordinary functions
execute-in-thread-pool: Private ordinary functions

F
Function, event!: Public ordinary functions
Function, event+: Public ordinary functions
Function, event-: Public ordinary functions
Function, event-handlers-list: Public ordinary functions
Function, execute-in-thread-pool: Private ordinary functions
Function, get-thread-pool: Private ordinary functions
Function, make-once-handler: Private ordinary functions

G
Generic Function, (setf sink-handlers): Private generic functions
Generic Function, (setf sink-handlers-copy): Private generic functions
Generic Function, add-event-handler: Public generic functions
Generic Function, invoke-event-handlers: Public generic functions
Generic Function, invoke-executor: Public generic functions
Generic Function, remove-event-handler: Public generic functions
Generic Function, sink-handlers: Private generic functions
Generic Function, sink-handlers-copy: Private generic functions
Generic Function, sink-handlers-list: Public generic functions
get-thread-pool: Private ordinary functions

I
invoke-event-handlers: Public generic functions
invoke-event-handlers: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions
invoke-executor: Public generic functions

M
Macro, cas: Private macros
make-once-handler: Private ordinary functions
Method, (setf sink-handlers): Private generic functions
Method, (setf sink-handlers-copy): Private generic functions
Method, add-event-handler: Public generic functions
Method, add-event-handler: Public generic functions
Method, invoke-event-handlers: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, invoke-executor: Public generic functions
Method, remove-event-handler: Public generic functions
Method, remove-event-handler: Public generic functions
Method, sink-handlers: Private generic functions
Method, sink-handlers-copy: Private generic functions
Method, sink-handlers-list: Public generic functions
Method, sink-handlers-list: Public generic functions

R
remove-event-handler: Public generic functions
remove-event-handler: Public generic functions
remove-event-handler: Public generic functions

S
sink-handlers: Private generic functions
sink-handlers: Private generic functions
sink-handlers-copy: Private generic functions
sink-handlers-copy: Private generic functions
sink-handlers-list: Public generic functions
sink-handlers-list: Public generic functions
sink-handlers-list: Public generic functions


A.3 Variables


A.4 Data types

Jump to:   A   B   C   E   F   M   N   P   S   T  
Index Entry  Section

A
api.lisp: The cl-events/src/api․lisp file

B
base.lisp: The cl-events/src/executors/base․lisp file
base.lisp: The cl-events/src/sinks/base․lisp file
broadcast-event: Public classes

C
cas.lisp: The cl-events/src/support/cas․lisp file
chained-executor: Public classes
chained-executor.lisp: The cl-events/src/executors/chained-executor․lisp file
cl-events: The cl-events system
cl-events: The cl-events package
cl-events.asd: The cl-events/cl-events․asd file
cl-events.system: The cl-events․system package
Class, broadcast-event: Public classes
Class, chained-executor: Public classes
Class, event: Public classes
Class, multi-thread-sink: Public classes
Class, non-blocking-event: Public classes
Class, pooled-executor: Public classes
Class, serial-executor: Public classes
Class, simple-event: Public classes
Class, single-thread-sink: Public classes
Class, threaded-executor: Public classes

E
event: Public classes
events.lisp: The cl-events/src/events․lisp file
executors: The cl-events/src/executors module

F
File, api.lisp: The cl-events/src/api․lisp file
File, base.lisp: The cl-events/src/executors/base․lisp file
File, base.lisp: The cl-events/src/sinks/base․lisp file
File, cas.lisp: The cl-events/src/support/cas․lisp file
File, chained-executor.lisp: The cl-events/src/executors/chained-executor․lisp file
File, cl-events.asd: The cl-events/cl-events․asd file
File, events.lisp: The cl-events/src/events․lisp file
File, multi-thread-sink.lisp: The cl-events/src/sinks/multi-thread-sink․lisp file
File, package.lisp: The cl-events/src/package․lisp file
File, pooled-executor.lisp: The cl-events/src/executors/pooled-executor․lisp file
File, serial-executor.lisp: The cl-events/src/executors/serial-executor․lisp file
File, single-thread-sink.lisp: The cl-events/src/sinks/single-thread-sink․lisp file
File, threaded-executor.lisp: The cl-events/src/executors/threaded-executor․lisp file

M
Module, executors: The cl-events/src/executors module
Module, sinks: The cl-events/src/sinks module
Module, src: The cl-events/src module
Module, support: The cl-events/src/support module
multi-thread-sink: Public classes
multi-thread-sink.lisp: The cl-events/src/sinks/multi-thread-sink․lisp file

N
non-blocking-event: Public classes

P
Package, cl-events: The cl-events package
Package, cl-events.system: The cl-events․system package
package.lisp: The cl-events/src/package․lisp file
pooled-executor: Public classes
pooled-executor.lisp: The cl-events/src/executors/pooled-executor․lisp file

S
serial-executor: Public classes
serial-executor.lisp: The cl-events/src/executors/serial-executor․lisp file
simple-event: Public classes
single-thread-sink: Public classes
single-thread-sink.lisp: The cl-events/src/sinks/single-thread-sink․lisp file
sinks: The cl-events/src/sinks module
src: The cl-events/src module
support: The cl-events/src/support module
System, cl-events: The cl-events system

T
threaded-executor: Public classes
threaded-executor.lisp: The cl-events/src/executors/threaded-executor․lisp file