The patron Reference Manual

Table of Contents

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

The patron Reference Manual

This is the patron Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:24:16 2018 GMT+0.


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

1 Introduction

       ____   ____ ______ ____   ___  ____
!!  ! |    \ /    |      T    \ /   \|    \  !!!!
!!!   |  o  Y  o  |      |  D  Y     Y  _  l  ! !!!
!!!!  |   _/|     l_   __j     |  O  |  |  |   !!!!
!!:   |  |  |  _  | |  | |    \|     |  |  |  !: :!
:!:   |  |  |  |  | |  | |  .  l     !  |  |   : ::
 ::   l__j  l__j__j l__j l__j\_j\___/l__j__j   :  :

Abstract

Patron is a multi-consumer/multi-producer thread pooling library written in Common Lisp with flexibility and performance in mind. You simply create a PATRON with a job queue of fixed size, specify a fixed number of WORKER threads and start submitting your JOBs into the work queue.

While Patron is written in portable Common Lisp in mind, because of some platform specific features[1], it currently works on SBCL and CCL platforms. As a side note, Patron currently depends on bordeaux-threads library for common threading functionalities.

[1] Semaphores, missing threading features (THREAD-JOIN, WITHOUT-INTERRUPTS, etc.) in bordeaux-threads, WITH-TIMEOUT macro.

Example

Below basic example should get you to a point where you can start creating thread pools in minutes.

(defvar *stream* *standard-output*)

(defvar *stream-lock* (patron:make-lock))

(defun safe-format (fmt &rest args)
  (patron:with-lock *stream-lock*
    (apply #'format *stream* fmt args)))

(defun thread-stats (patron)
  (safe-format
   "Keepers: ~{~A~^ ~}~%Workers: ~{~A~^ ~}~%"
   (map 'list #'patron:thread-alive-p (patron::keepers-of patron))
   (map 'list #'patron:thread-alive-p (patron::workers-of patron))))

(let ((state (make-random-state)))
  (defun job ()
    (let ((duration (random 5 state)))
      (safe-format "  ~S => Sleeping... [~A]~%" (patron:current-thread) duration)
      (sleep duration)
      (safe-format "  ~S => Done!~%" (patron:current-thread)))))

(defun report-result (job)
  (safe-format "RESULT: JOB: ~S~%" job))

(defun patron-test ()
  (let* ((patron
          (make-instance
           'patron:patron
           :worker-capacity 3
           :job-capacity 32
           :worker-timeout-duration 3)))
    (safe-format "Starting...~%")
    (patron:start-patron patron)
    (sleep 1.0)
    (thread-stats patron)
    (safe-format "Submitting jobs...~%")
    (loop repeat 5
          do (patron:submit-job
              patron
              (make-instance
                   'patron:job
                   :function #'job
                   :result-report-function #'report-result)))
    (safe-format "Submitted.~%")
    (safe-format "Stopping...~%")
    (patron:stop-patron patron :wait t)
    (safe-format "Stopped.~%")
    (thread-stats patron)))

; Starting...
; Keepers: T T
; Workers: T T T
; Submitting jobs...
; Submitted.
; Stopping...
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8D21}> => Sleeping... [2]
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8F71}> => Sleeping... [2]
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040EA1D1}> => Sleeping... [3]
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8D21}> => Done!
; RESULT: JOB: #<PATRON:JOB :FUNCTION #<FUNCTION TEST::JOB> :START-TIME "2009-04-30 14:41:49" :FINISH-TIME "2009-04-30 14:41:51" {1004155561}>
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8D21}> => Sleeping... [3]
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8F71}> => Done!
; RESULT: JOB: #<PATRON:JOB :FUNCTION #<FUNCTION TEST::JOB> :START-TIME "2009-04-30 14:41:49" :FINISH-TIME "2009-04-30 14:41:51" {1004155891}>
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8F71}> => Sleeping... [2]
; 2009-04-30 14:41:52 - #<PATRON:JOB :FUNCTION #<FUNCTION TEST::JOB> :START-TIME "2009-04-30 14:41:49" :CONDITION #<PATRON::TIMEOUT-CONDITION :DURATION 3 :TIME "2009-04-30 14:41:52"> {1004155BC1}>
;   #<SB-THREAD:THREAD "Anonymous" RUNNING {10040E8F71}> => Done!
; RESULT: JOB: #<PATRON:JOB :FUNCTION #<FUNCTION TEST::JOB> :START-TIME "2009-04-30 14:41:51" :FINISH-TIME "2009-04-30 14:41:53" {1004156231}>
; 2009-04-30 14:41:54 - #<PATRON:JOB :FUNCTION #<FUNCTION TEST::JOB> :START-TIME "2009-04-30 14:41:51" :CONDITION #<PATRON::TIMEOUT-CONDITION :DURATION 3 :TIME "2009-04-30 14:41:54"> {1004155EF1}>
; Stopped.
; Keepers: NIL NIL
; Workers: NIL NIL NIL

Documentation

Before going into the syntatical details, here is a general figure about the inner workings of Patron.

While Patron source code is fully documented, below you'll find the documentation excerpts from the source code for exported symbols.

[Condition] timeout-condition (error-condition)
  [Slot] time - Time condition instance is created.
  [Slot] duration - Elapsed duration before condition is raised.

Condition thrown when the duration specified in the WITH-TIMEOUT is exceeded. (TIME slot is inherited from ERROR-CONDITION.)

[Function] default-error-report (condition)

Default function for reporting errors.

[Class] thread ()
  [Slot] id - Implementation dependent thread identifier.
  [Slot] function - Function executed by current thread.

[Function] make-lock ()

[Macro] with-lock (lock &body body)

[Function] thread-start (thread)

[Function] current-thread ()

[Function] thread-alive-p (thread)

[Function] thread-interrupt (thread function)

[Function] thread-join (thread)

[Macro] without-interrupts (&body body)

[Class] job ()
  [Slot] function - Function will be called to start the execution.
  [Slot] result-report-function - Function will be called to report the result.
  [Slot] error-report-function - Function will be called to report an error.
  [Slot] submit-time - Job queue entrance time.
  [Slot] start-time - Job execution start time.
  [Slot] finish-time - Job execution finish time.
  [Slot] condition - Signaled condition in case of a failure.
  [Slot] result - Job result in case of no failure.

[Class] patron ()
  [Slot] error-report-function - Will get called for management related
         errors -- e.g when found a dead worker, keeper, etc.
  [Slot] job-capacity - Upper limit on the job queue size.
  [Slot] worker-capacity - Number of serving `WORKER's.
  [Slot] worker-timeout-duration - Time limit on the work processing duration.
  [Slot] keeper-timeout-duration - Wait period for keepers.

[Function] submit-job (patron job)

Submit given JOB into the job queue of PATRON. Function works in a blocking manner and returns inserted JOB, or throws a TIMEOUT-CONDITION.

[Function] worker-stats (patron)

Returns a property list of minimum, maximum, and average statistics of N-FAILURES, FAIL-DURATION, BUSY-DURATION, and IDLE-DURATION slots among workers. Function blocks job queue while gathering statistics.

[Function] start-patron (patron)

After switching STATE to :ACTIVE, starts WORKERSs and KEEPERs in order.

[Function] stop-patron (patron &key wait kill)

After switching STATE to :INACTIVE, stops KEEPERs and WORKERs in order. For related effects of keyword arguments see documentation of STOP-KEEPERS and STOP-WORKERS functions.


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 patron

Author

Volkan YAZICI <volkan.yazici@gmail.com>

License

BSD

Description

A compact thread pool implementation.

Dependency

bordeaux-threads

Source

patron.asd (file)

Component

src (module)


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

3 Modules

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


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

3.1 patron/src

Parent

patron (system)

Location

src/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 patron.asd

Location

patron.asd

Systems

patron (system)

Packages

patron-system


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

4.1.2 patron/src/packages.lisp

Parent

src (module)

Location

src/packages.lisp

Packages

patron


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

4.1.3 patron/src/specials.lisp

Dependency

packages.lisp (file)

Parent

src (module)

Location

src/specials.lisp

Exported Definitions
Internal Definitions

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

4.1.4 patron/src/utils.lisp

Dependency

specials.lisp (file)

Parent

src (module)

Location

src/utils.lisp

Internal Definitions

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

4.1.5 patron/src/semaphore.lisp

Dependency

utils.lisp (file)

Parent

src (module)

Location

src/semaphore.lisp

Internal Definitions

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

4.1.6 patron/src/thread.lisp

Dependency

semaphore.lisp (file)

Parent

src (module)

Location

src/thread.lisp

Exported Definitions

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

4.1.7 patron/src/queue.lisp

Dependency

thread.lisp (file)

Parent

src (module)

Location

src/queue.lisp

Internal Definitions

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

4.1.8 patron/src/timeout.lisp

Dependency

queue.lisp (file)

Parent

src (module)

Location

src/timeout.lisp

Internal Definitions

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

4.1.9 patron/src/job.lisp

Dependency

timeout.lisp (file)

Parent

src (module)

Location

src/job.lisp

Exported Definitions

submit-job (function)


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

4.1.10 patron/src/worker.lisp

Dependency

job.lisp (file)

Parent

src (module)

Location

src/worker.lisp

Exported Definitions

worker-stats (function)

Internal Definitions

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

4.1.11 patron/src/keeper.lisp

Dependency

worker.lisp (file)

Parent

src (module)

Location

src/keeper.lisp

Internal Definitions

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

4.1.12 patron/src/patron.lisp

Dependency

keeper.lisp (file)

Parent

src (module)

Location

src/patron.lisp

Exported Definitions
Internal Definitions

rotate-patron-state (function)


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

5 Packages

Packages are listed by definition order.


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

5.1 patron-system

Source

patron.asd

Use List

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

5.2 patron

Source

packages.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Macros

Macro: with-lock LOCK &body BODY
Package

patron

Source

thread.lisp (file)

Macro: without-interrupts &body BODY
Package

patron

Source

thread.lisp (file)


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

6.1.2 Functions

Function: current-thread ()
Package

patron

Source

thread.lisp (file)

Function: default-error-report CONDITION

Default function for reporting errors.

Package

patron

Source

specials.lisp (file)

Function: make-lock ()
Package

patron

Source

thread.lisp (file)

Function: start-patron PATRON

After switching ‘STATE’ to ‘:ACTIVE’, starts ‘WORKERS’s and ‘KEEPER’s in order.

Package

patron

Source

patron.lisp (file)

Function: stop-patron PATRON &key WAIT KILL

After switching ‘STATE’ to ‘:INACTIVE’, stops ‘KEEPER’s and ‘WORKER’s in order. For related effects of keyword arguments see documentation of ‘STOP-KEEPERS’ and ‘STOP-WORKERS’ functions.

Package

patron

Source

patron.lisp (file)

Function: submit-job PATRON JOB

Submit given ‘JOB’ into the job queue of ‘PATRON’. Function works in a blocking manner and returns inserted ‘JOB’, or throws a ‘TIMEOUT-CONDITION’.

Package

patron

Source

job.lisp (file)

Function: thread-alive-p THREAD
Package

patron

Source

thread.lisp (file)

Function: thread-interrupt THREAD FUNCTION
Package

patron

Source

thread.lisp (file)

Function: thread-join THREAD
Package

patron

Source

thread.lisp (file)

Function: thread-start THREAD
Package

patron

Source

thread.lisp (file)

Function: worker-stats PATRON

Returns a property list of minimum, maximum, and average statistics of ‘N-FAILURES’, ‘FAIL-DURATION’, ‘BUSY-DURATION’, and ‘IDLE-DURATION’ slots among workers. Function blocks job queue while gathering statistics.

Package

patron

Source

worker.lisp (file)


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

6.1.3 Generic functions

Generic Function: condition-of OBJECT
Generic Function: (setf condition-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: condition-of (KEEPER keeper)
Method: (setf condition-of) NEW-VALUE (KEEPER keeper)

Condition catched in case of a crash.

Source

specials.lisp (file)

Method: condition-of (JOB job)
Method: (setf condition-of) NEW-VALUE (JOB job)

Signaled condition in case of a failure.

Source

specials.lisp (file)

Generic Function: duration-of CONDITION
Package

patron

Methods
Method: duration-of (CONDITION timeout-condition)
Source

specials.lisp (file)

Generic Function: error-report-function-of OBJECT
Package

patron

Methods
Method: error-report-function-of (PATRON patron)

Will get called for management related errors – e.g when found a dead worker, keeper, etc.

Source

specials.lisp (file)

Method: error-report-function-of (JOB job)

Function will be called to report an error.

Source

specials.lisp (file)

Generic Function: finish-time-of OBJECT
Generic Function: (setf finish-time-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: finish-time-of (KEEPER keeper)
Method: (setf finish-time-of) NEW-VALUE (KEEPER keeper)

Exit/Crash date.

Source

specials.lisp (file)

Method: finish-time-of (JOB job)
Method: (setf finish-time-of) NEW-VALUE (JOB job)

Job execution finish time.

Source

specials.lisp (file)

Generic Function: function-of OBJECT
Generic Function: (setf function-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: function-of (THREAD thread)
Method: (setf function-of) NEW-VALUE (THREAD thread)

Function executed by current thread.

Source

specials.lisp (file)

Method: function-of (JOB job)

Function will be called to start the execution.

Source

specials.lisp (file)

Generic Function: id-of OBJECT
Generic Function: (setf id-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: id-of (THREAD thread)
Method: (setf id-of) NEW-VALUE (THREAD thread)

Implementation dependent thread identifier.

Source

specials.lisp (file)

Generic Function: job-capacity-of OBJECT
Package

patron

Methods
Method: job-capacity-of (PATRON patron)

Upper limit on the job queue size.

Source

specials.lisp (file)

Generic Function: keeper-timeout-duration-of OBJECT
Package

patron

Methods
Method: keeper-timeout-duration-of (PATRON patron)

Wait period for keepers.

Source

specials.lisp (file)

Generic Function: result-of OBJECT
Generic Function: (setf result-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: result-of (JOB job)
Method: (setf result-of) NEW-VALUE (JOB job)

Job result in case of no failure.

Source

specials.lisp (file)

Generic Function: result-report-function-of OBJECT
Package

patron

Methods
Method: result-report-function-of (JOB job)

Function will be called to report the result.

Source

specials.lisp (file)

Generic Function: start-time-of OBJECT
Generic Function: (setf start-time-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: start-time-of (KEEPER keeper)
Method: (setf start-time-of) NEW-VALUE (KEEPER keeper)

Birth date.

Source

specials.lisp (file)

Method: start-time-of (JOB job)
Method: (setf start-time-of) NEW-VALUE (JOB job)

Job execution start time.

Source

specials.lisp (file)

Generic Function: submit-time-of OBJECT
Generic Function: (setf submit-time-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: submit-time-of (JOB job)
Method: (setf submit-time-of) NEW-VALUE (JOB job)

Job queue entrance time.

Source

specials.lisp (file)

Generic Function: time-of CONDITION
Package

patron

Methods
Method: time-of (CONDITION error-condition)
Source

specials.lisp (file)

Generic Function: worker-capacity-of OBJECT
Package

patron

Methods
Method: worker-capacity-of (PATRON patron)

Number of serving ‘WORKER’s.

Source

specials.lisp (file)

Generic Function: worker-timeout-duration-of OBJECT
Package

patron

Methods
Method: worker-timeout-duration-of (PATRON patron)

Time limit on the work processing duration.

Source

specials.lisp (file)


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

6.1.4 Classes

Class: job ()
Package

patron

Source

specials.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: function

Function will be called to start the execution.

Type

function

Initargs

:function

Initform

(error "missing `function'!")

Readers

function-of (generic function)

Slot: result-report-function

Function will be called to report the result.

Type

function

Initargs

:result-report-function

Readers

result-report-function-of (generic function)

Slot: error-report-function

Function will be called to report an error.

Type

function

Initargs

:error-report-function

Initform

(function patron:default-error-report)

Readers

error-report-function-of (generic function)

Slot: submit-time

Job queue entrance time.

Readers

submit-time-of (generic function)

Writers

(setf submit-time-of) (generic function)

Slot: start-time

Job execution start time.

Readers

start-time-of (generic function)

Writers

(setf start-time-of) (generic function)

Slot: finish-time

Job execution finish time.

Readers

finish-time-of (generic function)

Writers

(setf finish-time-of) (generic function)

Slot: condition

Signaled condition in case of a failure.

Readers

condition-of (generic function)

Writers

(setf condition-of) (generic function)

Slot: result

Job result in case of no failure.

Readers

result-of (generic function)

Writers

(setf result-of) (generic function)

Class: patron ()
Package

patron

Source

specials.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: state

State of the patron; either ‘ACTIVE’, or ‘INACTIVE’.

Type

keyword

Initform

:inactive

Readers

state-of (generic function)

Writers

(setf state-of) (generic function)

Slot: state-lock

Synchronization primitive for ‘STATE’ slot.

Initform

(patron:make-lock)

Readers

state-lock-of (generic function)

Slot: error-report-function

Will get called for management related errors – e.g when found a dead worker, keeper, etc.

Type

function

Initargs

:error-report-function

Initform

(function patron:default-error-report)

Readers

error-report-function-of (generic function)

Slot: jobs

FIFO queue of ‘JOB’s waiting to be processed.

Type

patron::queue

Readers

jobs-of (generic function)

Writers

(setf jobs-of) (generic function)

Slot: job-capacity

Upper limit on the job queue size.

Type

(integer 1 *)

Initargs

:job-capacity

Initform

(error "missing `job-capacity'!")

Readers

job-capacity-of (generic function)

Slot: workers

Vector of serving ‘WORKER’s.

Type

(simple-array patron::worker (*))

Readers

workers-of (generic function)

Writers

(setf workers-of) (generic function)

Slot: worker-capacity

Number of serving ‘WORKER’s.

Type

(integer 1 *)

Initargs

:worker-capacity

Initform

(error "missing `worker-capacity'!")

Readers

worker-capacity-of (generic function)

Slot: worker-timeout-duration

Time limit on the work processing duration.

Type

(integer 1 *)

Initargs

:worker-timeout-duration

Initform

(error "missing `worker-timeout-duration'!")

Readers

worker-timeout-duration-of (generic function)

Slot: keepers

‘KEEPER’ couple for ‘WORKER’s and each other.

Readers

keepers-of (generic function)

Writers

(setf keepers-of) (generic function)

Slot: keeper-timeout-duration

Wait period for keepers.

Type

(integer 1 *)

Initargs

:keeper-timeout-duration

Initform

5

Readers

keeper-timeout-duration-of (generic function)

Class: thread ()
Package

patron

Source

specials.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
  • print-object (method)
  • function-of (method)
  • function-of (method)
  • id-of (method)
  • id-of (method)
Direct slots
Slot: id

Implementation dependent thread identifier.

Readers

id-of (generic function)

Writers

(setf id-of) (generic function)

Slot: function

Function executed by current thread.

Readers

function-of (generic function)

Writers

(setf function-of) (generic function)


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

6.2 Internal definitions


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

6.2.1 Special variables

Special Variable: *error-stream*

Generic stream used by default error reporting functions.

Package

patron

Source

specials.lisp (file)


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

6.2.2 Macros

Macro: prog1-let (VAR VAL) &body BODY
Package

patron

Source

utils.lisp (file)

Macro: when-let (VAR VAL) &body BODY
Package

patron

Source

utils.lisp (file)

Macro: with-blocking-queue-operations QUEUE &body BODY

Function blocks any physical push/pop operations on the ‘QUEUE’ while execution ‘BODY’.

Package

patron

Source

queue.lisp (file)

Macro: with-timeout DURATION &body BODY

Execute ‘BODY’ for no more than specified ‘DURATION’. In case of timeout, function throws a ‘TIMEOUT-CONDITION’.

Package

patron

Source

timeout.lisp (file)

Macro: with-unique-names (&rest BINDINGS) &body BODY
Package

patron

Source

utils.lisp (file)


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

6.2.3 Functions

Function: %queue-pop QUEUE &optional DEFAULT

Pops an item from the given ‘QUEUE’. Function returns ‘DEFAULT’ in case of no available elements found.

Package

patron

Source

queue.lisp (file)

Function: %queue-push QUEUE ITEM

Pushes given ‘ITEM’ into the ‘QUEUE’. Function returns supplied ‘ITEM’.

Package

patron

Source

queue.lisp (file)

Function: %with-timeout DURATION BODY
Package

patron

Source

timeout.lisp (file)

Function: keeper KEEPER PATRON

Keeper function to ensure the existence of its parent ‘KEEPER’ and ‘WORKER’s.

In case of a dead ‘KEEPER’/‘WORKER’ instance is found, ‘N-KEEPER-FAILURES’/‘N-WORKER-FAILURES’ slot is incremented and ‘ERROR-REPORT-FUNCTION’ the ‘PATRON’ is called with the inactive instance as argument.

Function loops infinitely by checking if ‘STATE’ is still ‘:ACTIVE’ before every ‘KEEPER-TIMEOUT-DURATION’ interval. In case of an error, ‘CONDITION’ slot of the ‘KEEPER’ is filled appropriately.

Package

patron

Source

keeper.lisp (file)

Function: kill-keeper KEEPER
Package

patron

Source

keeper.lisp (file)

Function: kill-worker WORKER
Package

patron

Source

worker.lisp (file)

Function: make-keeper PATRON

Make an appropriate ‘KEEPER’ instance with a specific wrapper function around ‘KEEPER’ function.

Package

patron

Source

keeper.lisp (file)

Function: make-worker PATRON
Package

patron

Source

worker.lisp (file)

Function: queue-pop QUEUE

Pops an item from the given ‘QUEUE’. Function blocks if there isn’t any available item in the queue.

Package

patron

Source

queue.lisp (file)

Function: queue-push QUEUE ITEM

Tries to push given ‘ITEM’ into the ‘QUEUE’. If queue size gets exceeded, function blocks until at least an item is consumed from the queue. Function returns supplied ‘ITEM’.

Package

patron

Source

queue.lisp (file)

Function: queue-timed-pop QUEUE DURATION &optional TIMEOUT

Works like ‘QUEUE-POP’, but function returns ‘TIMEOUT’ if no available elements found in given ‘DURATION’.

Package

patron

Source

queue.lisp (file)

Function: queue-timed-push QUEUE ITEM DURATION &optional TIMEOUT

Works like ‘QUEUE-PUSH’, but function returns ‘TIMEOUT’ if no push occurs in given ‘DURATION’.

Package

patron

Source

queue.lisp (file)

Function: rotate-patron-state PATRON TARGET-STATE

Switches ‘STATE’ slot of ‘PATRON’ to specified ‘TARGET-STATE’.

Package

patron

Source

patron.lisp (file)

Function: semaphore-make &optional COUNT
Package

patron

Source

semaphore.lisp (file)

Function: semaphore-signal SEMAPHORE
Package

patron

Source

semaphore.lisp (file)

Function: semaphore-timed-wait SEMAPHORE DURATION
Package

patron

Source

semaphore.lisp (file)

Function: semaphore-wait SEMAPHORE
Package

patron

Source

semaphore.lisp (file)

Function: start-keepers PATRON

Starts ‘KEEPER’s and waits for them to wake up. Function returns given ‘PATRON’.

Package

patron

Source

keeper.lisp (file)

Function: start-workers PATRON

Fills ‘WORKERS’ and ‘JOBS’ slots of the given ‘PATRON’ appropriately and spawns workers. Function returns supplied ‘PATRON’.

Package

patron

Source

worker.lisp (file)

Function: stop-keepers PATRON &key KILL WAIT

Function does nothing – assuming ‘STATE’ is switched to ‘:INACTIVE’, ‘KEEPER’ function will exit in the next loop round. Function returns given ‘PATRON’.

If ‘KILL’ is true, function will try to terminate every keeper via throwing a ‘KILL-CONDITION’. ‘CONDITION’ slot of related ‘KEEPER’s will get set to this condition appropriately.

If ‘WAIT’ is true, function will wait (at most ‘KEEPER-TIMEOUT-DURATION’) for ‘KEEPER’s to exit.

Package

patron

Source

keeper.lisp (file)

Function: stop-workers PATRON &key KILL WAIT

Stops workers by pushing ‘NIL’ jobs to the queue as much as total # of workers. Function blocks until there is enough space in the job queue to push dummy ‘NIL’s. Function finally returns supplied ‘PATRON’.

If ‘KILL’ is true, function will try to terminate every worker that is still alive and report jobs about the situation via ‘ERROR-SUBMIT-FUNCTION’. ‘CONDITION’ slot of the ‘JOB’ will set to ‘KILL-CONDITION’.

If ‘WAIT’ is true, function will wait (at most ‘WORKER-TIMEOUT-DURATION’) for ‘WORKER’s to exit.

Package

patron

Source

worker.lisp (file)

Function: time->string TIME
Package

patron

Source

specials.lisp (file)

Function: wait-keeper KEEPER

Wait for ‘KEEPER’ to exit.

Package

patron

Source

keeper.lisp (file)

Function: wait-worker WORKER
Package

patron

Source

worker.lisp (file)

Function: worker WORKER PATRON

Worker function to execute the next available job in the queue. Function infinitely tries to pop ‘JOB’ from the queue until it receives a ‘NIL’ job.

During every job processing iteration, function resets ‘LAST-START-TIME’, ‘LAST-FINISH-TIME’, ‘N-FAILURES’, ‘FAIL-DURATION’, ‘BUSY-DURATION’, and ‘IDLE-DURATION’ slots of the ‘WORKER’ accordingly.

‘START-TIME’ and ‘FINISH-TIME’ slots of the ‘JOB’ is assigned respectively before and after the execution of the ‘FUNCTION’ slot of the ‘JOB’. After execution, if there doesn’t occur any errors, ‘RESULT’ slot of the ‘JOB’ is set accordingly and ‘RESULT-REPORT-FUNCTION’ is called with ‘JOB’ as argument. In case of an error, ‘CONDITION’ slot is set and ‘ERROR-REPORT-FUNCTION’ is called.

Package

patron

Source

worker.lisp (file)


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

6.2.4 Generic functions

Generic Function: busy-duration-of OBJECT
Generic Function: (setf busy-duration-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: busy-duration-of (WORKER worker)
Method: (setf busy-duration-of) NEW-VALUE (WORKER worker)

Total non-idle duration.

Source

specials.lisp (file)

Generic Function: fail-duration-of OBJECT
Generic Function: (setf fail-duration-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: fail-duration-of (WORKER worker)
Method: (setf fail-duration-of) NEW-VALUE (WORKER worker)

Total duration spend on failed processings.

Source

specials.lisp (file)

Generic Function: head-of OBJECT
Generic Function: (setf head-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: head-of (QUEUE queue)

automatically generated reader method

Source

specials.lisp (file)

Method: (setf head-of) NEW-VALUE (QUEUE queue)

automatically generated writer method

Source

specials.lisp (file)

Generic Function: idle-duration-of OBJECT
Generic Function: (setf idle-duration-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: idle-duration-of (WORKER worker)
Method: (setf idle-duration-of) NEW-VALUE (WORKER worker)

Total duration worker stayed idle.

Source

specials.lisp (file)

Generic Function: jobs-of OBJECT
Generic Function: (setf jobs-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: jobs-of (PATRON patron)
Method: (setf jobs-of) NEW-VALUE (PATRON patron)

FIFO queue of ‘JOB’s waiting to be processed.

Source

specials.lisp (file)

Generic Function: keepers-of OBJECT
Generic Function: (setf keepers-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: keepers-of (PATRON patron)
Method: (setf keepers-of) NEW-VALUE (PATRON patron)

‘KEEPER’ couple for ‘WORKER’s and each other.

Source

specials.lisp (file)

Generic Function: last-finish-time-of OBJECT
Generic Function: (setf last-finish-time-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: last-finish-time-of (WORKER worker)
Method: (setf last-finish-time-of) NEW-VALUE (WORKER worker)

Last time worker finished a job.

Source

specials.lisp (file)

Generic Function: last-start-time-of OBJECT
Generic Function: (setf last-start-time-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: last-start-time-of (WORKER worker)
Method: (setf last-start-time-of) NEW-VALUE (WORKER worker)

Last time worker started a job.

Source

specials.lisp (file)

Generic Function: n-failures-of OBJECT
Generic Function: (setf n-failures-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: n-failures-of (WORKER worker)
Method: (setf n-failures-of) NEW-VALUE (WORKER worker)

# of failed processings.

Source

specials.lisp (file)

Generic Function: n-keeper-failures-of OBJECT
Generic Function: (setf n-keeper-failures-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: n-keeper-failures-of (KEEPER keeper)
Method: (setf n-keeper-failures-of) NEW-VALUE (KEEPER keeper)

# of ‘KEEPER’ failures found.

Source

specials.lisp (file)

Generic Function: n-worker-failures-of OBJECT
Generic Function: (setf n-worker-failures-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: n-worker-failures-of (KEEPER keeper)
Method: (setf n-worker-failures-of) NEW-VALUE (KEEPER keeper)

# of ‘WORKER’ failures found.

Source

specials.lisp (file)

Generic Function: pop-lock-of OBJECT
Generic Function: (setf pop-lock-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: pop-lock-of (QUEUE queue)
Method: (setf pop-lock-of) NEW-VALUE (QUEUE queue)

Lock serializing pop operations.

Source

specials.lisp (file)

Generic Function: pop-semaphore-of OBJECT
Generic Function: (setf pop-semaphore-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: pop-semaphore-of (QUEUE queue)
Method: (setf pop-semaphore-of) NEW-VALUE (QUEUE queue)

Semaphore blocking pop operations while queue is empty.

Source

specials.lisp (file)

Generic Function: push-lock-of OBJECT
Generic Function: (setf push-lock-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: push-lock-of (QUEUE queue)
Method: (setf push-lock-of) NEW-VALUE (QUEUE queue)

Lock serializing push operations.

Source

specials.lisp (file)

Generic Function: push-semaphore-of OBJECT
Generic Function: (setf push-semaphore-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: push-semaphore-of (QUEUE queue)
Method: (setf push-semaphore-of) NEW-VALUE (QUEUE queue)

Semaphore blocking push operations while queue is full.

Source

specials.lisp (file)

Generic Function: size-of OBJECT
Package

patron

Methods
Method: size-of (QUEUE queue)

Maximum # of items allowed in the queue.

Source

specials.lisp (file)

Generic Function: state-lock-of OBJECT
Package

patron

Methods
Method: state-lock-of (PATRON patron)

Synchronization primitive for ‘STATE’ slot.

Source

specials.lisp (file)

Generic Function: state-of OBJECT
Generic Function: (setf state-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: state-of (PATRON patron)
Method: (setf state-of) NEW-VALUE (PATRON patron)

State of the patron; either ‘ACTIVE’, or ‘INACTIVE’.

Source

specials.lisp (file)

Generic Function: tail-of OBJECT
Generic Function: (setf tail-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: tail-of (QUEUE queue)

automatically generated reader method

Source

specials.lisp (file)

Method: (setf tail-of) NEW-VALUE (QUEUE queue)

automatically generated writer method

Source

specials.lisp (file)

Generic Function: workers-of OBJECT
Generic Function: (setf workers-of) NEW-VALUE OBJECT
Package

patron

Methods
Method: workers-of (PATRON patron)
Method: (setf workers-of) NEW-VALUE (PATRON patron)

Vector of serving ‘WORKER’s.

Source

specials.lisp (file)


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

6.2.5 Conditions

Condition: error-condition ()

Generic wrapper condition for application specific conditions.

Package

patron

Source

specials.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods

time-of (method)

Direct slots
Slot: time

Time condition instance is created.

Initform

(quote (get-universal-time))

Readers

time-of (generic function)

Condition: kill-condition ()

Condition passed to the ‘CONDITION’ slot of a ‘KEEPER’/‘JOB’ while killing a keeper/worker.

Package

patron

Source

specials.lisp (file)

Direct superclasses

error-condition (condition)

Direct methods

print-object (method)

Condition: timeout-condition ()

Condition thrown when the duration specified in the ‘WITH-TIMEOUT’ is exceeded.

Package

patron

Source

specials.lisp (file)

Direct superclasses

error-condition (condition)

Direct methods
Direct slots
Slot: duration

Elapsed duration before condition is raised.

Initargs

:duration

Readers

duration-of (generic function)


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

6.2.6 Classes

Class: keeper ()
Package

patron

Source

specials.lisp (file)

Direct superclasses

thread (class)

Direct methods
Direct slots
Slot: start-time

Birth date.

Initform

(get-universal-time)

Readers

start-time-of (generic function)

Writers

(setf start-time-of) (generic function)

Slot: finish-time

Exit/Crash date.

Readers

finish-time-of (generic function)

Writers

(setf finish-time-of) (generic function)

Slot: condition

Condition catched in case of a crash.

Readers

condition-of (generic function)

Writers

(setf condition-of) (generic function)

Slot: n-keeper-failures

# of ‘KEEPER’ failures found.

Initform

0

Readers

n-keeper-failures-of (generic function)

Writers

(setf n-keeper-failures-of) (generic function)

Slot: n-worker-failures

# of ‘WORKER’ failures found.

Initform

0

Readers

n-worker-failures-of (generic function)

Writers

(setf n-worker-failures-of) (generic function)

Class: queue ()

Size bounded two-lock concurrent FIFO queue.

Package

patron

Source

specials.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: head
Type

list

Readers

head-of (generic function)

Writers

(setf head-of) (generic function)

Slot: tail
Type

list

Readers

tail-of (generic function)

Writers

(setf tail-of) (generic function)

Slot: size

Maximum # of items allowed in the queue.

Type

(integer 1 *)

Initargs

:size

Readers

size-of (generic function)

Slot: pop-lock

Lock serializing pop operations.

Readers

pop-lock-of (generic function)

Writers

(setf pop-lock-of) (generic function)

Slot: pop-semaphore

Semaphore blocking pop operations while queue is empty.

Readers

pop-semaphore-of (generic function)

Writers

(setf pop-semaphore-of) (generic function)

Slot: push-lock

Lock serializing push operations.

Readers

push-lock-of (generic function)

Writers

(setf push-lock-of) (generic function)

Slot: push-semaphore

Semaphore blocking push operations while queue is full.

Readers

push-semaphore-of (generic function)

Writers

(setf push-semaphore-of) (generic function)

Class: worker ()
Package

patron

Source

specials.lisp (file)

Direct superclasses

thread (class)

Direct methods
Direct slots
Slot: last-start-time

Last time worker started a job.

Readers

last-start-time-of (generic function)

Writers

(setf last-start-time-of) (generic function)

Slot: last-finish-time

Last time worker finished a job.

Readers

last-finish-time-of (generic function)

Writers

(setf last-finish-time-of) (generic function)

Slot: n-failures

# of failed processings.

Type

(integer 0 *)

Initform

0

Readers

n-failures-of (generic function)

Writers

(setf n-failures-of) (generic function)

Slot: fail-duration

Total duration spend on failed processings.

Type

(integer 0 *)

Initform

0

Readers

fail-duration-of (generic function)

Writers

(setf fail-duration-of) (generic function)

Slot: busy-duration

Total non-idle duration.

Type

(integer 0 *)

Initform

0

Readers

busy-duration-of (generic function)

Writers

(setf busy-duration-of) (generic function)

Slot: idle-duration

Total duration worker stayed idle.

Type

(integer 0 *)

Initform

0

Readers

idle-duration-of (generic function)

Writers

(setf idle-duration-of) (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   M   P  
Index Entry  Section

F
File, Lisp, patron.asd: The patron<dot>asd file
File, Lisp, patron/src/job.lisp: The patron/src/job<dot>lisp file
File, Lisp, patron/src/keeper.lisp: The patron/src/keeper<dot>lisp file
File, Lisp, patron/src/packages.lisp: The patron/src/packages<dot>lisp file
File, Lisp, patron/src/patron.lisp: The patron/src/patron<dot>lisp file
File, Lisp, patron/src/queue.lisp: The patron/src/queue<dot>lisp file
File, Lisp, patron/src/semaphore.lisp: The patron/src/semaphore<dot>lisp file
File, Lisp, patron/src/specials.lisp: The patron/src/specials<dot>lisp file
File, Lisp, patron/src/thread.lisp: The patron/src/thread<dot>lisp file
File, Lisp, patron/src/timeout.lisp: The patron/src/timeout<dot>lisp file
File, Lisp, patron/src/utils.lisp: The patron/src/utils<dot>lisp file
File, Lisp, patron/src/worker.lisp: The patron/src/worker<dot>lisp file

L
Lisp File, patron.asd: The patron<dot>asd file
Lisp File, patron/src/job.lisp: The patron/src/job<dot>lisp file
Lisp File, patron/src/keeper.lisp: The patron/src/keeper<dot>lisp file
Lisp File, patron/src/packages.lisp: The patron/src/packages<dot>lisp file
Lisp File, patron/src/patron.lisp: The patron/src/patron<dot>lisp file
Lisp File, patron/src/queue.lisp: The patron/src/queue<dot>lisp file
Lisp File, patron/src/semaphore.lisp: The patron/src/semaphore<dot>lisp file
Lisp File, patron/src/specials.lisp: The patron/src/specials<dot>lisp file
Lisp File, patron/src/thread.lisp: The patron/src/thread<dot>lisp file
Lisp File, patron/src/timeout.lisp: The patron/src/timeout<dot>lisp file
Lisp File, patron/src/utils.lisp: The patron/src/utils<dot>lisp file
Lisp File, patron/src/worker.lisp: The patron/src/worker<dot>lisp file

M
Module, patron/src: The patron/src module

P
patron.asd: The patron<dot>asd file
patron/src: The patron/src module
patron/src/job.lisp: The patron/src/job<dot>lisp file
patron/src/keeper.lisp: The patron/src/keeper<dot>lisp file
patron/src/packages.lisp: The patron/src/packages<dot>lisp file
patron/src/patron.lisp: The patron/src/patron<dot>lisp file
patron/src/queue.lisp: The patron/src/queue<dot>lisp file
patron/src/semaphore.lisp: The patron/src/semaphore<dot>lisp file
patron/src/specials.lisp: The patron/src/specials<dot>lisp file
patron/src/thread.lisp: The patron/src/thread<dot>lisp file
patron/src/timeout.lisp: The patron/src/timeout<dot>lisp file
patron/src/utils.lisp: The patron/src/utils<dot>lisp file
patron/src/worker.lisp: The patron/src/worker<dot>lisp file

Jump to:   F   L   M   P  

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

A.2 Functions

Jump to:   %   (  
B   C   D   E   F   G   H   I   J   K   L   M   N   P   Q   R   S   T   W  
Index Entry  Section

%
%queue-pop: Internal functions
%queue-push: Internal functions
%with-timeout: Internal functions

(
(setf busy-duration-of): Internal generic functions
(setf busy-duration-of): Internal generic functions
(setf condition-of): Exported generic functions
(setf condition-of): Exported generic functions
(setf condition-of): Exported generic functions
(setf fail-duration-of): Internal generic functions
(setf fail-duration-of): Internal generic functions
(setf finish-time-of): Exported generic functions
(setf finish-time-of): Exported generic functions
(setf finish-time-of): Exported generic functions
(setf function-of): Exported generic functions
(setf function-of): Exported generic functions
(setf head-of): Internal generic functions
(setf head-of): Internal generic functions
(setf id-of): Exported generic functions
(setf id-of): Exported generic functions
(setf idle-duration-of): Internal generic functions
(setf idle-duration-of): Internal generic functions
(setf jobs-of): Internal generic functions
(setf jobs-of): Internal generic functions
(setf keepers-of): Internal generic functions
(setf keepers-of): Internal generic functions
(setf last-finish-time-of): Internal generic functions
(setf last-finish-time-of): Internal generic functions
(setf last-start-time-of): Internal generic functions
(setf last-start-time-of): Internal generic functions
(setf n-failures-of): Internal generic functions
(setf n-failures-of): Internal generic functions
(setf n-keeper-failures-of): Internal generic functions
(setf n-keeper-failures-of): Internal generic functions
(setf n-worker-failures-of): Internal generic functions
(setf n-worker-failures-of): Internal generic functions
(setf pop-lock-of): Internal generic functions
(setf pop-lock-of): Internal generic functions
(setf pop-semaphore-of): Internal generic functions
(setf pop-semaphore-of): Internal generic functions
(setf push-lock-of): Internal generic functions
(setf push-lock-of): Internal generic functions
(setf push-semaphore-of): Internal generic functions
(setf push-semaphore-of): Internal generic functions
(setf result-of): Exported generic functions
(setf result-of): Exported generic functions
(setf start-time-of): Exported generic functions
(setf start-time-of): Exported generic functions
(setf start-time-of): Exported generic functions
(setf state-of): Internal generic functions
(setf state-of): Internal generic functions
(setf submit-time-of): Exported generic functions
(setf submit-time-of): Exported generic functions
(setf tail-of): Internal generic functions
(setf tail-of): Internal generic functions
(setf workers-of): Internal generic functions
(setf workers-of): Internal generic functions

B
busy-duration-of: Internal generic functions
busy-duration-of: Internal generic functions

C
condition-of: Exported generic functions
condition-of: Exported generic functions
condition-of: Exported generic functions
current-thread: Exported functions

D
default-error-report: Exported functions
duration-of: Exported generic functions
duration-of: Exported generic functions

E
error-report-function-of: Exported generic functions
error-report-function-of: Exported generic functions
error-report-function-of: Exported generic functions

F
fail-duration-of: Internal generic functions
fail-duration-of: Internal generic functions
finish-time-of: Exported generic functions
finish-time-of: Exported generic functions
finish-time-of: Exported generic functions
Function, %queue-pop: Internal functions
Function, %queue-push: Internal functions
Function, %with-timeout: Internal functions
Function, current-thread: Exported functions
Function, default-error-report: Exported functions
Function, keeper: Internal functions
Function, kill-keeper: Internal functions
Function, kill-worker: Internal functions
Function, make-keeper: Internal functions
Function, make-lock: Exported functions
Function, make-worker: Internal functions
Function, queue-pop: Internal functions
Function, queue-push: Internal functions
Function, queue-timed-pop: Internal functions
Function, queue-timed-push: Internal functions
Function, rotate-patron-state: Internal functions
Function, semaphore-make: Internal functions
Function, semaphore-signal: Internal functions
Function, semaphore-timed-wait: Internal functions
Function, semaphore-wait: Internal functions
Function, start-keepers: Internal functions
Function, start-patron: Exported functions
Function, start-workers: Internal functions
Function, stop-keepers: Internal functions
Function, stop-patron: Exported functions
Function, stop-workers: Internal functions
Function, submit-job: Exported functions
Function, thread-alive-p: Exported functions
Function, thread-interrupt: Exported functions
Function, thread-join: Exported functions
Function, thread-start: Exported functions
Function, time->string: Internal functions
Function, wait-keeper: Internal functions
Function, wait-worker: Internal functions
Function, worker: Internal functions
Function, worker-stats: Exported functions
function-of: Exported generic functions
function-of: Exported generic functions
function-of: Exported generic functions

G
Generic Function, (setf busy-duration-of): Internal generic functions
Generic Function, (setf condition-of): Exported generic functions
Generic Function, (setf fail-duration-of): Internal generic functions
Generic Function, (setf finish-time-of): Exported generic functions
Generic Function, (setf function-of): Exported generic functions
Generic Function, (setf head-of): Internal generic functions
Generic Function, (setf id-of): Exported generic functions
Generic Function, (setf idle-duration-of): Internal generic functions
Generic Function, (setf jobs-of): Internal generic functions
Generic Function, (setf keepers-of): Internal generic functions
Generic Function, (setf last-finish-time-of): Internal generic functions
Generic Function, (setf last-start-time-of): Internal generic functions
Generic Function, (setf n-failures-of): Internal generic functions
Generic Function, (setf n-keeper-failures-of): Internal generic functions
Generic Function, (setf n-worker-failures-of): Internal generic functions
Generic Function, (setf pop-lock-of): Internal generic functions
Generic Function, (setf pop-semaphore-of): Internal generic functions
Generic Function, (setf push-lock-of): Internal generic functions
Generic Function, (setf push-semaphore-of): Internal generic functions
Generic Function, (setf result-of): Exported generic functions
Generic Function, (setf start-time-of): Exported generic functions
Generic Function, (setf state-of): Internal generic functions
Generic Function, (setf submit-time-of): Exported generic functions
Generic Function, (setf tail-of): Internal generic functions
Generic Function, (setf workers-of): Internal generic functions
Generic Function, busy-duration-of: Internal generic functions
Generic Function, condition-of: Exported generic functions
Generic Function, duration-of: Exported generic functions
Generic Function, error-report-function-of: Exported generic functions
Generic Function, fail-duration-of: Internal generic functions
Generic Function, finish-time-of: Exported generic functions
Generic Function, function-of: Exported generic functions
Generic Function, head-of: Internal generic functions
Generic Function, id-of: Exported generic functions
Generic Function, idle-duration-of: Internal generic functions
Generic Function, job-capacity-of: Exported generic functions
Generic Function, jobs-of: Internal generic functions
Generic Function, keeper-timeout-duration-of: Exported generic functions
Generic Function, keepers-of: Internal generic functions
Generic Function, last-finish-time-of: Internal generic functions
Generic Function, last-start-time-of: Internal generic functions
Generic Function, n-failures-of: Internal generic functions
Generic Function, n-keeper-failures-of: Internal generic functions
Generic Function, n-worker-failures-of: Internal generic functions
Generic Function, pop-lock-of: Internal generic functions
Generic Function, pop-semaphore-of: Internal generic functions
Generic Function, push-lock-of: Internal generic functions
Generic Function, push-semaphore-of: Internal generic functions
Generic Function, result-of: Exported generic functions
Generic Function, result-report-function-of: Exported generic functions
Generic Function, size-of: Internal generic functions
Generic Function, start-time-of: Exported generic functions
Generic Function, state-lock-of: Internal generic functions
Generic Function, state-of: Internal generic functions
Generic Function, submit-time-of: Exported generic functions
Generic Function, tail-of: Internal generic functions
Generic Function, time-of: Exported generic functions
Generic Function, worker-capacity-of: Exported generic functions
Generic Function, worker-timeout-duration-of: Exported generic functions
Generic Function, workers-of: Internal generic functions

H
head-of: Internal generic functions
head-of: Internal generic functions

I
id-of: Exported generic functions
id-of: Exported generic functions
idle-duration-of: Internal generic functions
idle-duration-of: Internal generic functions

J
job-capacity-of: Exported generic functions
job-capacity-of: Exported generic functions
jobs-of: Internal generic functions
jobs-of: Internal generic functions

K
keeper: Internal functions
keeper-timeout-duration-of: Exported generic functions
keeper-timeout-duration-of: Exported generic functions
keepers-of: Internal generic functions
keepers-of: Internal generic functions
kill-keeper: Internal functions
kill-worker: Internal functions

L
last-finish-time-of: Internal generic functions
last-finish-time-of: Internal generic functions
last-start-time-of: Internal generic functions
last-start-time-of: Internal generic functions

M
Macro, prog1-let: Internal macros
Macro, when-let: Internal macros
Macro, with-blocking-queue-operations: Internal macros
Macro, with-lock: Exported macros
Macro, with-timeout: Internal macros
Macro, with-unique-names: Internal macros
Macro, without-interrupts: Exported macros
make-keeper: Internal functions
make-lock: Exported functions
make-worker: Internal functions
Method, (setf busy-duration-of): Internal generic functions
Method, (setf condition-of): Exported generic functions
Method, (setf condition-of): Exported generic functions
Method, (setf fail-duration-of): Internal generic functions
Method, (setf finish-time-of): Exported generic functions
Method, (setf finish-time-of): Exported generic functions
Method, (setf function-of): Exported generic functions
Method, (setf head-of): Internal generic functions
Method, (setf id-of): Exported generic functions
Method, (setf idle-duration-of): Internal generic functions
Method, (setf jobs-of): Internal generic functions
Method, (setf keepers-of): Internal generic functions
Method, (setf last-finish-time-of): Internal generic functions
Method, (setf last-start-time-of): Internal generic functions
Method, (setf n-failures-of): Internal generic functions
Method, (setf n-keeper-failures-of): Internal generic functions
Method, (setf n-worker-failures-of): Internal generic functions
Method, (setf pop-lock-of): Internal generic functions
Method, (setf pop-semaphore-of): Internal generic functions
Method, (setf push-lock-of): Internal generic functions
Method, (setf push-semaphore-of): Internal generic functions
Method, (setf result-of): Exported generic functions
Method, (setf start-time-of): Exported generic functions
Method, (setf start-time-of): Exported generic functions
Method, (setf state-of): Internal generic functions
Method, (setf submit-time-of): Exported generic functions
Method, (setf tail-of): Internal generic functions
Method, (setf workers-of): Internal generic functions
Method, busy-duration-of: Internal generic functions
Method, condition-of: Exported generic functions
Method, condition-of: Exported generic functions
Method, duration-of: Exported generic functions
Method, error-report-function-of: Exported generic functions
Method, error-report-function-of: Exported generic functions
Method, fail-duration-of: Internal generic functions
Method, finish-time-of: Exported generic functions
Method, finish-time-of: Exported generic functions
Method, function-of: Exported generic functions
Method, function-of: Exported generic functions
Method, head-of: Internal generic functions
Method, id-of: Exported generic functions
Method, idle-duration-of: Internal generic functions
Method, job-capacity-of: Exported generic functions
Method, jobs-of: Internal generic functions
Method, keeper-timeout-duration-of: Exported generic functions
Method, keepers-of: Internal generic functions
Method, last-finish-time-of: Internal generic functions
Method, last-start-time-of: Internal generic functions
Method, n-failures-of: Internal generic functions
Method, n-keeper-failures-of: Internal generic functions
Method, n-worker-failures-of: Internal generic functions
Method, pop-lock-of: Internal generic functions
Method, pop-semaphore-of: Internal generic functions
Method, push-lock-of: Internal generic functions
Method, push-semaphore-of: Internal generic functions
Method, result-of: Exported generic functions
Method, result-report-function-of: Exported generic functions
Method, size-of: Internal generic functions
Method, start-time-of: Exported generic functions
Method, start-time-of: Exported generic functions
Method, state-lock-of: Internal generic functions
Method, state-of: Internal generic functions
Method, submit-time-of: Exported generic functions
Method, tail-of: Internal generic functions
Method, time-of: Exported generic functions
Method, worker-capacity-of: Exported generic functions
Method, worker-timeout-duration-of: Exported generic functions
Method, workers-of: Internal generic functions

N
n-failures-of: Internal generic functions
n-failures-of: Internal generic functions
n-keeper-failures-of: Internal generic functions
n-keeper-failures-of: Internal generic functions
n-worker-failures-of: Internal generic functions
n-worker-failures-of: Internal generic functions

P
pop-lock-of: Internal generic functions
pop-lock-of: Internal generic functions
pop-semaphore-of: Internal generic functions
pop-semaphore-of: Internal generic functions
prog1-let: Internal macros
push-lock-of: Internal generic functions
push-lock-of: Internal generic functions
push-semaphore-of: Internal generic functions
push-semaphore-of: Internal generic functions

Q
queue-pop: Internal functions
queue-push: Internal functions
queue-timed-pop: Internal functions
queue-timed-push: Internal functions

R
result-of: Exported generic functions
result-of: Exported generic functions
result-report-function-of: Exported generic functions
result-report-function-of: Exported generic functions
rotate-patron-state: Internal functions

S
semaphore-make: Internal functions
semaphore-signal: Internal functions
semaphore-timed-wait: Internal functions
semaphore-wait: Internal functions
size-of: Internal generic functions
size-of: Internal generic functions
start-keepers: Internal functions
start-patron: Exported functions
start-time-of: Exported generic functions
start-time-of: Exported generic functions
start-time-of: Exported generic functions
start-workers: Internal functions
state-lock-of: Internal generic functions
state-lock-of: Internal generic functions
state-of: Internal generic functions
state-of: Internal generic functions
stop-keepers: Internal functions
stop-patron: Exported functions
stop-workers: Internal functions
submit-job: Exported functions
submit-time-of: Exported generic functions
submit-time-of: Exported generic functions

T
tail-of: Internal generic functions
tail-of: Internal generic functions
thread-alive-p: Exported functions
thread-interrupt: Exported functions
thread-join: Exported functions
thread-start: Exported functions
time->string: Internal functions
time-of: Exported generic functions
time-of: Exported generic functions

W
wait-keeper: Internal functions
wait-worker: Internal functions
when-let: Internal macros
with-blocking-queue-operations: Internal macros
with-lock: Exported macros
with-timeout: Internal macros
with-unique-names: Internal macros
without-interrupts: Exported macros
worker: Internal functions
worker-capacity-of: Exported generic functions
worker-capacity-of: Exported generic functions
worker-stats: Exported functions
worker-timeout-duration-of: Exported generic functions
worker-timeout-duration-of: Exported generic functions
workers-of: Internal generic functions
workers-of: Internal generic functions

Jump to:   %   (  
B   C   D   E   F   G   H   I   J   K   L   M   N   P   Q   R   S   T   W  

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

A.3 Variables

Jump to:   *  
B   C   D   E   F   H   I   J   K   L   N   P   R   S   T   W  
Index Entry  Section

*
*error-stream*: Internal special variables

B
busy-duration: Internal classes

C
condition: Exported classes
condition: Internal classes

D
duration: Internal conditions

E
error-report-function: Exported classes
error-report-function: Exported classes

F
fail-duration: Internal classes
finish-time: Exported classes
finish-time: Internal classes
function: Exported classes
function: Exported classes

H
head: Internal classes

I
id: Exported classes
idle-duration: Internal classes

J
job-capacity: Exported classes
jobs: Exported classes

K
keeper-timeout-duration: Exported classes
keepers: Exported classes

L
last-finish-time: Internal classes
last-start-time: Internal classes

N
n-failures: Internal classes
n-keeper-failures: Internal classes
n-worker-failures: Internal classes

P
pop-lock: Internal classes
pop-semaphore: Internal classes
push-lock: Internal classes
push-semaphore: Internal classes

R
result: Exported classes
result-report-function: Exported classes

S
size: Internal classes
Slot, busy-duration: Internal classes
Slot, condition: Exported classes
Slot, condition: Internal classes
Slot, duration: Internal conditions
Slot, error-report-function: Exported classes
Slot, error-report-function: Exported classes
Slot, fail-duration: Internal classes
Slot, finish-time: Exported classes
Slot, finish-time: Internal classes
Slot, function: Exported classes
Slot, function: Exported classes
Slot, head: Internal classes
Slot, id: Exported classes
Slot, idle-duration: Internal classes
Slot, job-capacity: Exported classes
Slot, jobs: Exported classes
Slot, keeper-timeout-duration: Exported classes
Slot, keepers: Exported classes
Slot, last-finish-time: Internal classes
Slot, last-start-time: Internal classes
Slot, n-failures: Internal classes
Slot, n-keeper-failures: Internal classes
Slot, n-worker-failures: Internal classes
Slot, pop-lock: Internal classes
Slot, pop-semaphore: Internal classes
Slot, push-lock: Internal classes
Slot, push-semaphore: Internal classes
Slot, result: Exported classes
Slot, result-report-function: Exported classes
Slot, size: Internal classes
Slot, start-time: Exported classes
Slot, start-time: Internal classes
Slot, state: Exported classes
Slot, state-lock: Exported classes
Slot, submit-time: Exported classes
Slot, tail: Internal classes
Slot, time: Internal conditions
Slot, worker-capacity: Exported classes
Slot, worker-timeout-duration: Exported classes
Slot, workers: Exported classes
Special Variable, *error-stream*: Internal special variables
start-time: Exported classes
start-time: Internal classes
state: Exported classes
state-lock: Exported classes
submit-time: Exported classes

T
tail: Internal classes
time: Internal conditions

W
worker-capacity: Exported classes
worker-timeout-duration: Exported classes
workers: Exported classes

Jump to:   *  
B   C   D   E   F   H   I   J   K   L   N   P   R   S   T   W  

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

A.4 Data types

Jump to:   C   E   J   K   P   Q   S   T   W  
Index Entry  Section

C
Class, job: Exported classes
Class, keeper: Internal classes
Class, patron: Exported classes
Class, queue: Internal classes
Class, thread: Exported classes
Class, worker: Internal classes
Condition, error-condition: Internal conditions
Condition, kill-condition: Internal conditions
Condition, timeout-condition: Internal conditions

E
error-condition: Internal conditions

J
job: Exported classes

K
keeper: Internal classes
kill-condition: Internal conditions

P
Package, patron: The patron package
Package, patron-system: The patron-system package
patron: The patron system
patron: The patron package
patron: Exported classes
patron-system: The patron-system package

Q
queue: Internal classes

S
System, patron: The patron system

T
thread: Exported classes
timeout-condition: Internal conditions

W
worker: Internal classes

Jump to:   C   E   J   K   P   Q   S   T   W