Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the safe-queue Reference Manual, version 0.2, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 14:57:33 2020 GMT+0.
• Introduction | What safe-queue is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Thread-safe queues and mailboxes. Provides uniform queue/mailbox interface. On sbcl uses sb-concurrency and lparallel on others
(setf q (make-mailbox))
(mailbox-send-message q 1)
(mailbox-send-message q 2)
(mailbox-send-message q 3)
(mailbox-receive-message q)
1
(mailbox-receive-message q)
2
(mailbox-receive-message q)
3
(mailbox-receive-message-no-hang q)
NIL
NIL
(mailbox-receive-message q :timeout 5)
;; hopefuly after 5 seconds
NIL
NIL
(mailbox-receive-message q)
Thread blocked
Copyright (c) 2010-2013 3b https://github.com/3b
Copyright (c) 2013-2015 Ilya Khaprov ilya.khaprov@publitechs.com
MIT
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The safe-queue system |
Ilya Khaprov <ilya.khaprov@publitechs.com>
MIT
Thread-safe queue and mailbox
0.2
safe-queue.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The safe-queue.asd file | ||
• The safe-queue/src/package.lisp file | ||
• The safe-queue/src/sb-concurrency-patch.lisp file | ||
• The safe-queue/src/concurrency-sbcl.lisp file |
Next: The safe-queue/src/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
safe-queue.asd
safe-queue (system)
Next: The safe-queue/src/sb-concurrency-patch․lisp file, Previous: The safe-queue․asd file, Up: Lisp files [Contents][Index]
safe-queue (system)
src/package.lisp
Next: The safe-queue/src/concurrency-sbcl․lisp file, Previous: The safe-queue/src/package․lisp file, Up: Lisp files [Contents][Index]
src/package.lisp (file)
safe-queue (system)
src/sb-concurrency-patch.lisp
Previous: The safe-queue/src/sb-concurrency-patch․lisp file, Up: Lisp files [Contents][Index]
safe-queue (system)
src/concurrency-sbcl.lisp
mailboxp (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The safe-queue-system package | ||
• The safe-queue package |
Next: The safe-queue package, Previous: Packages, Up: Packages [Contents][Index]
safe-queue.asd
Previous: The safe-queue-system package, Up: Packages [Contents][Index]
src/package.lisp (file)
common-lisp
mailboxp (function)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions | ||
• Exported types |
Next: Exported types, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Retrieves the oldest value in QUEUE and returns it as the primary value, and T as secondary value. If the queue is empty, returns NIL as both primary and secondary value.
src/concurrency-sbcl.lisp (file)
Adds VALUE to the end of QUEUE. Returns VALUE.
src/concurrency-sbcl.lisp (file)
Returns the number of messages currently in the MAILBOX.
src/concurrency-sbcl.lisp (file)
Returns true if MAILBOX is currently empty, NIL otherwise.
src/concurrency-sbcl.lisp (file)
Returns a fresh list containing all the messages in the mailbox. Does not remove messages from the mailbox.
src/concurrency-sbcl.lisp (file)
Removes the oldest message from MAILBOX and returns it as the primary value. If MAILBOX is empty waits until a message arrives.
src/concurrency-sbcl.lisp (file)
The non-blocking variant of RECEIVE-MESSAGE. Returns two values, the message removed from MAILBOX, and a flag specifying whether a message could be received.
src/concurrency-sbcl.lisp (file)
Removes and returns all (or at most N) currently pending messages
from MAILBOX, or returns NIL if no messages are pending.
Note: Concurrent threads may be snarfing messages during the run of this function, so even though X,Y appear right next to each other in the result, does not necessarily mean that Y was the message sent right after X.
src/concurrency-sbcl.lisp (file)
Adds a MESSAGE to MAILBOX. Message can be any object.
src/concurrency-sbcl.lisp (file)
Returns a new MAILBOX with messages in INITIAL-CONTENTS enqueued.
src/concurrency-sbcl.lisp (file)
Returns a new QUEUE with NAME and contents of the INITIAL-CONTENTS sequence enqueued.
src/concurrency-sbcl.lisp (file)
Returns the number of messages currently in the QUEUE.
src/concurrency-sbcl.lisp (file)
Returns true if QUEUE is currently empty, NIL otherwise.
src/concurrency-sbcl.lisp (file)
Previous: Exported functions, Up: Exported definitions [Contents][Index]
src/concurrency-sbcl.lisp (file)
src/concurrency-sbcl.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions |
Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Returns true if MAILBOX is currently empty, NIL otherwise.
src/concurrency-sbcl.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L S |
---|
Jump to: | F L S |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | D E F M Q |
---|
Jump to: | D E F M Q |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | M P Q S T |
---|
Jump to: | M P Q S T |
---|