The green-threads Reference Manual

Table of Contents

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

The green-threads Reference Manual

This is the green-threads Reference Manual, version 0.3, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:58:47 2018 GMT+0.


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

1 Introduction

Green-Threads

A lightweight thread / cooperative multitasking library for Common Lisp.

Usage

Allows for cooperative multitasking with help of CL-CONT for continuations. Tries to mimic BORDEAUX-THREADS API as much as possible.

Let's show how the threads work and build up to higher level abstractions.

The MAKE-THREAD function takes a closure/function of zero arguments and starts executing it, since we are not using OS threads, it cannot actually preempt the thread, so the thread has to yield by calling QUEUE-NEXT, passing a closure containing the continuation of the thread and return. MAKE-THREAD has an optional keyword parameter :NAME for specifying a name for the thread.

In this example, we create a thread which executes immediately, it creates an additional thread and then continues on, it yields by calling QUEUE-NEXT and passing a continuation. That allows the other thread to execute before continuing the first:

(use-package :green-threads)

(make-thread
  (lambda ()
    (format t "Do Something~%")
    (make-thread
      (lambda ()
        (format t "Do Something Else.~%")))
    (queue-next ;; queue next action and yield
      (lambda ()
        (format t "Do More.~%")))))

;; output:
;; Do Something
;; Do Something Else.
;; Do More.

In the above example, the continuation of the primary thread is nested inside a QUEUE-NEXT call. That's pretty inconvenient. Nobody enjoys programming in continuation-passing-style (CPS), so let's see how we can avoid that.

In the next example, we use the CL-CONT library directly to transform our code into CPS which allows us to use THREAD-YIELD to yield without having to specify the continuation ourselves. You'll notice that the primary thread no longer has to nest the continuation in a closure.

(make-thread
  (cl-cont:with-call/cc
    (lambda ()
      (format t "Do Something~%")
      (cl-cont:without-call/cc
        (make-thread
          (cl-cont:with-call/cc
            (lambda ()
              (format t "Do Something Else~%")))))
      (thread-yield) ;; allow other threads to run
      (format t "Do More~%"))))

The last example is a bit noisy with the CL-CONT calls, so we can instead use the WITH-GREEN-THREAD macro which wraps our code in an anonymous closure, and applies CL-CONT macros appropriately.

(with-green-thread
  (format t "Do Something~%")
  (with-green-thread
    (format t "Do Something Else~%"))
  (thread-yield) ;; allow other threads to run
  (format t "Do More~%"))

Viola, you can now write cooperatively multitasking code without resorting to writing CPS by hand.

Dynamic bindings don't over well into green threads, so this library has a similar mechanism as BORDEAUX-THREADS, and that is the *DEFAULT-SPECIAL-BINDINGS* special variable which can be set to an alist of symbol/value pairs that will be specially bound in any green threads you create.

(defparameter *foo* "outer")

(with-green-thread
  (print *foo*)
  (let ((*default-special-bindings* '((*foo* . "first"))))
    (with-green-thread
      (print *foo*)))
  (thread-yield)
  (print *foo*))

;; output:
;; "outer"
;; "first"
;; "outer"

MAKE-THREAD creates a new green thread and runs it if no green threads are currently running. If called from within a running green thread, it will queue the thread to run later.

CURRENT-THREAD returns the currently running thread object or NIL if you are not currently in one.

THREADP returns T if the object passed to it is a thread object.

THREAD-NAME returns the name of the thread passed to it or NIL of none was provided.

ALL-THREADS returns a list of all threads.

DESTROY-THREAD will do just that, cannot be called on currently executing thread.

THREAD-ALIVE-P returns T if thread passed to it is still alive.

JOIN-THREAD (thread) Requires CL-CONT:WITH-CALL/CC environment, causes the current thread to wait for the other thread to complete before continuing.

Futures

MAKE-FUTURE () creates a future object.

QUEUE-FUTURE (future action &optional thread) queues an action on current (or specified) thread to take place when provided future is completed.

FINISH (future &rest values) signals that a future is complete and provides return values for the future.

FUTURE-FINISHED-P (future) T if future has already had COMPLETE-FUTURE called on it.

FUTURE-VALUES (future) Returns the values given to the future when it was completed.

WAIT-ON (future) Requires CL-CONT:WITH-CALL/CC environment, causes the current thread to wait for the completion of the specified future and returns the values given to the future when it was completed.

GET-JOIN-FUTURE (thread) Returns a future which will complete when the passed in thread completes. This provides a lower level way to join threads without using JOIN-THREAD which requires CL-CONT:WITH-CALL/CC.

Example use of futures from (taken from tests):

(defparameter *future-one* (make-future))

(defparameter *val1* nil)
(defparameter *val2* nil)

;; WAIT-FOR test
(with-green-thread
  (multiple-value-bind (v1 v2) (wait-for *future-one*)
    (setf *val1* v1)
    (setf *val2* v2)))

(is *val1* nil)
(is *val2* nil)
(is (future-complete-p *future-one*) nil)

(complete-future *future-one* :foo :bar)

(is *val1* :foo)
(is *val2* :bar)
(is (future-complete-p *future-one*) T)

Channels

Inspired by sykopomp's ChanL, which relies on BORDEAUX-THREADS, I've added basic unbuffered channel support.

(make-instance 'CHANNEL) creates a new channel.

SEND/CC (channel value &key blockp) Requires CL-CONT:WITH-CALL/CC environment. Sends a value to a channel, and blocks, unless blockp is nil. Returns the channel that received the value unless blockp is nil and there is no thread waiting to receive in which case it returns nil.

RECV/CC (channel &key blockp) Requires CL-CONT:WITH-CALL/CC environment. Receives a value from a channel, and blocks, unless blockp is nil. Returns 2 values, the first is the value being received and the second is a generalized boolean that is only nil if blockp is nil and there is no thread waiting to send a value.

SEND (channel value continuation &key blockp) Just like SEND/CC but doesn't require CL-CONT, you just have to pass in the continuation manually. CPS is fun. Instead of returning the channel that receives the message, it (or nil) is passed to continuation.

RECV (channel continuation &key blockp) Just like RECV/CC but doesn't require CL-CONT, you just have to pass in the continuation manually. CPS is fun. Instead of returning the 2 values, the continuation is called with them.

Behold, the venerable sieve of Eratosthenes:

(ql:quickload :green-threads)

(cl-cont:defun/cc counter (end chan)
  (loop for i from 2 to end
        do (gt:send/cc chan i)))

(declaim (ftype function filter)) ;; unnecessary, silence warnings

(cl-cont:defun/cc filter (listen)
  (let ((prime (gt:recv/cc listen)))
    (format t "~a " prime)
    (let ((chan (make-instance 'gt:channel)))
      (gt:with-green-thread
        (filter chan))
      (loop
        (let ((i (gt:recv/cc listen)))
          (if (> (mod i prime) 0)
            (gt:send/cc chan i)))))))

(gt:with-green-thread
  (let ((count (make-instance 'gt:channel)))
    (gt:with-green-thread
      (counter 100 count))
    (gt:with-green-thread
      (filter count))))

Installation

Clone repo into ~/quicklisp/local-projects. Run the following command:

(ql:quickload :green-threads)

TODO

100% test coverage.

Author

Copyright

Copyright (c) 2012 Stephen A. Goss (steveth45@gmail.com)

License

Licensed under the Modified BSD License.


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 green-threads

Author

Stephen A. Goss

License

Modified BSD

Description

A lightweight threading / cooperative multitasking library.

Long Description

# Green-Threads

A lightweight thread / cooperative multitasking library for Common Lisp.

## Usage

Allows for cooperative multitasking with help of CL-CONT for continuations. Tries to mimic BORDEAUX-THREADS API as much as possible.

Let’s show how the threads work and build up to higher level abstractions.

The MAKE-THREAD function takes a closure/function of zero arguments and starts executing it, since we are not using OS threads, it cannot actually preempt the thread, so the thread has to yield by calling QUEUE-NEXT, passing a closure containing the continuation of the thread and return. MAKE-THREAD has an optional keyword parameter :NAME for specifying a name for the thread.

In this example, we create a thread which executes immediately, it creates an additional thread and then continues on, it yields by calling QUEUE-NEXT and passing a continuation. That allows the other thread to execute before continuing the first:

“‘common-lisp
(use-package :green-threads)

(make-thread
(lambda ()
(format t "Do Something~%")
(make-thread
(lambda ()
(format t "Do Something Else.~%")))
(queue-next ;; queue next action and yield
(lambda ()
(format t "Do More.~%")))))

;; output:
;; Do Something
;; Do Something Else.
;; Do More.
“‘

In the above example, the continuation of the primary thread is nested inside a QUEUE-NEXT call. That’s pretty inconvenient. Nobody enjoys programming in continuation-passing-style (CPS), so let’s see how we can avoid that.

In the next example, we use the CL-CONT library directly to transform our code into CPS which allows us to use THREAD-YIELD to yield without having to specify the continuation ourselves. You’ll notice that the primary thread no longer has to nest the continuation in a closure.

“‘common-lisp
(make-thread
(cl-cont:with-call/cc
(lambda ()
(format t "Do Something~%")
(cl-cont:without-call/cc
(make-thread
(cl-cont:with-call/cc
(lambda ()
(format t "Do Something Else~%")))))
(thread-yield) ;; allow other threads to run
(format t "Do More~%"))))
“‘

The last example is a bit noisy with the CL-CONT calls, so we can instead use the WITH-GREEN-THREAD macro which wraps our code in an anonymous closure, and applies CL-CONT macros appropriately.

“‘common-lisp
(with-green-thread
(format t "Do Something~%")
(with-green-thread
(format t "Do Something Else~%"))
(thread-yield) ;; allow other threads to run
(format t "Do More~%"))
“‘

Viola, you can now write cooperatively multitasking code without resorting to writing CPS by hand.

Dynamic bindings don’t over well into green threads, so this library has a similar mechanism as BORDEAUX-THREADS, and that is the \*DEFAULT-SPECIAL-BINDINGS\* special variable which can be set to an alist of symbol/value pairs that will be specially bound in any green threads you create.

“‘common-lisp
(defparameter *foo* "outer")

(with-green-thread
(print *foo*)
(let ((*default-special-bindings* ’((*foo* . "first")))) (with-green-thread
(print *foo*)))
(thread-yield)
(print *foo*))

;; output:
;; "outer"
;; "first"
;; "outer"
“‘

MAKE-THREAD creates a new green thread and runs it if no green threads are currently running. If called from within a running green thread, it will queue the thread to run later.

CURRENT-THREAD returns the currently running thread object or NIL if you are not currently in one.

THREADP returns T if the object passed to it is a thread object.

THREAD-NAME returns the name of the thread passed to it or NIL of none was provided.

ALL-THREADS returns a list of all threads.

DESTROY-THREAD will do just that, cannot be called on currently executing thread.

THREAD-ALIVE-P returns T if thread passed to it is still alive.

JOIN-THREAD (thread) Requires CL-CONT:WITH-CALL/CC environment, causes the current thread to wait for the other thread to complete before continuing.

### Futures

MAKE-FUTURE () creates a future object.

QUEUE-FUTURE (future action &optional thread) queues an action on current (or specified) thread to take place when provided future is completed.

FINISH (future &rest values) signals that a future is complete
and provides return values for the future.

FUTURE-FINISHED-P (future) T if future has already had COMPLETE-FUTURE called on it.

FUTURE-VALUES (future) Returns the values given to the future when it was completed.

WAIT-ON (future) Requires CL-CONT:WITH-CALL/CC environment, causes the current thread to wait for the completion of the specified future and returns the values given to the future when it was completed.

GET-JOIN-FUTURE (thread) Returns a future which will complete when the passed in thread completes. This provides a lower level way to join threads without using JOIN-THREAD which requires CL-CONT:WITH-CALL/CC.

Example use of futures from (taken from tests):

“‘common-lisp
(defparameter *future-one* (make-future))

(defparameter *val1* nil)
(defparameter *val2* nil)

;; WAIT-FOR test
(with-green-thread
(multiple-value-bind (v1 v2) (wait-for *future-one*)
(setf *val1* v1)
(setf *val2* v2)))

(is *val1* nil)
(is *val2* nil)
(is (future-complete-p *future-one*) nil)

(complete-future *future-one* :foo :bar)

(is *val1* :foo)
(is *val2* :bar)
(is (future-complete-p *future-one*) T)
“‘

### Channels

Inspired by sykopomp’s [ChanL](https://github.com/sykopomp/chanl), which relies on BORDEAUX-THREADS, I’ve added basic unbuffered channel support.

(make-instance ’CHANNEL) creates a new channel.

SEND/CC (channel value &key blockp) Requires CL-CONT:WITH-CALL/CC environment. Sends a value to a channel, and blocks, unless blockp is nil. Returns the channel that received the value unless blockp is nil and there is no thread waiting to receive in which case it returns nil.

RECV/CC (channel &key blockp) Requires CL-CONT:WITH-CALL/CC environment. Receives a value from a channel, and blocks, unless blockp is nil. Returns 2 values, the first is the value being received and the second is a generalized boolean that is only nil if blockp is nil and there is no thread waiting to send a value.

SEND (channel value continuation &key blockp) Just like SEND/CC but doesn’t require CL-CONT, you just have to pass in the continuation manually. CPS is fun. Instead of returning the channel that receives the message, it (or nil) is passed to continuation.

RECV (channel continuation &key blockp) Just like RECV/CC but doesn’t require CL-CONT, you just have to pass in the continuation manually. CPS is fun. Instead of returning the 2 values, the continuation is called with them.

Behold, the venerable sieve of Eratosthenes:

“‘common-lisp
(ql:quickload :green-threads)

(cl-cont:defun/cc counter (end chan)
(loop for i from 2 to end
do (gt:send/cc chan i)))

(declaim (ftype function filter)) ;; unnecessary, silence warnings

(cl-cont:defun/cc filter (listen)
(let ((prime (gt:recv/cc listen)))
(format t "~a " prime)
(let ((chan (make-instance ’gt:channel))) (gt:with-green-thread
(filter chan))
(loop
(let ((i (gt:recv/cc listen)))
(if (> (mod i prime) 0)
(gt:send/cc chan i)))))))

(gt:with-green-thread
(let ((count (make-instance ’gt:channel))) (gt:with-green-thread
(counter 100 count))
(gt:with-green-thread
(filter count))))
“‘

## Installation

Clone repo into ~/quicklisp/local-projects. Run the following command:

“‘common-lisp
(ql:quickload :green-threads)
“‘

## TODO

100% test coverage.

## Author

* Stephen A. Goss (steveth45@gmail.com)

## Copyright

Copyright (c) 2012 Stephen A. Goss (steveth45@gmail.com)

# License

Licensed under the Modified BSD License.

Version

0.3

Dependencies
Source

green-threads.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 green-threads/src

Parent

green-threads (system)

Location

src/

Component

green-threads.lisp (file)


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 green-threads.asd

Location

green-threads.asd

Systems

green-threads (system)

Packages

green-threads-asd


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

4.1.2 green-threads/src/green-threads.lisp

Parent

src (module)

Location

src/green-threads.lisp

Packages

green-threads

Exported Definitions
Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 green-threads-asd

Source

green-threads.asd

Use List

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

5.2 green-threads

Source

green-threads.lisp (file)

Nickname

gt

Use List
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 Special variables

Special Variable: *default-special-bindings*
Package

green-threads

Source

green-threads.lisp (file)


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

6.1.2 Macros

Macro: with-green-thread &body BODY

A convenience macro that runs the code in a lambda wrapped in CPS transformin macros and a call to make-thread. Returns thread object.

Package

green-threads

Source

green-threads.lisp (file)


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

6.1.3 Functions

Function: all-threads ()

Returns a list of all active threads, which are threads that have been created but not destroyed or finished.

Package

green-threads

Source

green-threads.lisp (file)

Function: current-thread ()

Returns the currently running greed thread or NIL if not called from within thread.

Package

green-threads

Source

green-threads.lisp (file)

Function: destroy-thread THREAD

Destroys the thread passed in, so it will not run any more. It is an error to call this on the current thread.

Package

green-threads

Source

green-threads.lisp (file)

Function: future-values FUTURE

Returns the values given to the future when it was completed.

Package

green-threads

Source

green-threads.lisp (file)

Function: get-join-future THREAD

Gets a future object from thread which will be completed when the thread is finished.

Package

green-threads

Source

green-threads.lisp (file)

Function: join-thread &rest ARGS
Package

green-threads

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-cont-20110219-darcs/src/special-transformers.lisp

Function: make-thread FUNCTION &key NAME

Create a new green thread with an optional :name. The first parameter should be a function that takes no arguments. The thread will be queued immediately, so will run immediately if make-thread is called from outside any other green threads. Returns a thread object.

Package

green-threads

Source

green-threads.lisp (file)

Function: queue-future FUTURE ACTION &optional THREAD

Queues an action on current (or specified) thread to take place when provided future is completed.

Package

green-threads

Source

green-threads.lisp (file)

Function: queue-next ACTION &optional THREAD
Package

green-threads

Source

green-threads.lisp (file)

Function: recv/cc &rest ARGS
Package

green-threads

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-cont-20110219-darcs/src/special-transformers.lisp

Function: send/cc &rest ARGS
Package

green-threads

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-cont-20110219-darcs/src/special-transformers.lisp

Function: thread-alive-p THREAD

Returns T if the passed in thread has not been destroyed.

Package

green-threads

Source

green-threads.lisp (file)

Function: thread-name THREAD

Returns the name of the thread given at the time of creation or NIL.

Package

green-threads

Source

green-threads.lisp (file)

Function: thread-yield &rest ARGS
Package

green-threads

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-cont-20110219-darcs/src/special-transformers.lisp

Function: threadp OBJ

Returns T if the object passed in is a thread.

Package

green-threads

Source

green-threads.lisp (file)

Function: wait-on &rest ARGS
Package

green-threads

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/cl-cont-20110219-darcs/src/special-transformers.lisp


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

6.1.4 Generic functions

Generic Function: recv CHANNEL CONTINUATION &key BLOCKP
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: recv (CHANNEL channel) CONTINUATION &key BLOCKP
Generic Function: send CHANNEL VALUE CONTINUATION &key BLOCKP
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: send (CHANNEL channel) VALUE CONTINUATION &key BLOCKP

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

6.1.5 Classes

Class: channel ()
Package

green-threads

Source

green-threads.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: waiting-to-send
Initform

(make-instance (quote green-threads::batched-queue))

Slot: waiting-to-recv
Initform

(make-instance (quote green-threads::batched-queue))


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

6.2 Internal definitions


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

6.2.1 Special variables

Special Variable: *active-threads*
Package

green-threads

Source

green-threads.lisp (file)

Special Variable: *current-thread*
Package

green-threads

Source

green-threads.lisp (file)

Special Variable: *thread-queue*
Package

green-threads

Source

green-threads.lisp (file)


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

6.2.2 Functions

Function: bindings-from-alist ALIST
Package

green-threads

Source

green-threads.lisp (file)

Function: construct-batched-queue FRONT REAR
Package

green-threads

Source

green-threads.lisp (file)

Function: queue-next-replace ACTION &optional THREAD
Package

green-threads

Source

green-threads.lisp (file)

Function: thread-loop ()
Package

green-threads

Source

green-threads.lisp (file)


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

6.2.3 Generic functions

Generic Function: alive OBJECT
Generic Function: (setf alive) NEW-VALUE OBJECT
Package

green-threads

Methods
Method: alive (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Method: (setf alive) NEW-VALUE (THREAD thread)

automatically generated writer method

Source

green-threads.lisp (file)

Generic Function: binding-symbols OBJECT
Package

green-threads

Methods
Method: binding-symbols (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Generic Function: binding-values OBJECT
Package

green-threads

Methods
Method: binding-values (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Generic Function: empty-p SEQUENCE
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: empty-p (QUEUE batched-queue)
Generic Function: head SEQUENCE
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: head (QUEUE batched-queue)
Generic Function: join-future OBJECT
Package

green-threads

Methods
Method: join-future (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Generic Function: name OBJECT
Package

green-threads

Methods
Method: name (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Generic Function: next-action OBJECT
Generic Function: (setf next-action) NEW-VALUE OBJECT
Package

green-threads

Methods
Method: next-action (THREAD thread)

automatically generated reader method

Source

green-threads.lisp (file)

Method: (setf next-action) NEW-VALUE (THREAD thread)

automatically generated writer method

Source

green-threads.lisp (file)

Generic Function: size SEQUENCE
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: size (QUEUE batched-queue)
Generic Function: snoc SEQUENCE VALUE
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: snoc (QUEUE batched-queue) VALUE
Generic Function: tail SEQUENCE
Package

green-threads

Source

green-threads.lisp (file)

Methods
Method: tail (QUEUE batched-queue)

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

6.2.4 Classes

Class: batched-queue ()
Package

green-threads

Source

green-threads.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: front
Initargs

:front

Slot: rear
Initargs

:rear

Class: thread ()
Package

green-threads

Source

green-threads.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

name (generic function)

Slot: binding-symbols
Initargs

:binding-symbols

Readers

binding-symbols (generic function)

Slot: binding-values
Initargs

:binding-values

Readers

binding-values (generic function)

Slot: next-action
Readers

next-action (generic function)

Writers

(setf next-action) (generic function)

Slot: alive
Initform

t

Readers

alive (generic function)

Writers

(setf alive) (generic function)

Slot: join-future
Initform

(cl-async-future:make-future)

Readers

join-future (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   G   L   M  
Index Entry  Section

F
File, Lisp, green-threads.asd: The green-threads<dot>asd file
File, Lisp, green-threads/src/green-threads.lisp: The green-threads/src/green-threads<dot>lisp file

G
green-threads.asd: The green-threads<dot>asd file
green-threads/src: The green-threads/src module
green-threads/src/green-threads.lisp: The green-threads/src/green-threads<dot>lisp file

L
Lisp File, green-threads.asd: The green-threads<dot>asd file
Lisp File, green-threads/src/green-threads.lisp: The green-threads/src/green-threads<dot>lisp file

M
Module, green-threads/src: The green-threads/src module

Jump to:   F   G   L   M  

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

A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   J   M   N   Q   R   S   T   W  
Index Entry  Section

(
(setf alive): Internal generic functions
(setf alive): Internal generic functions
(setf next-action): Internal generic functions
(setf next-action): Internal generic functions

A
alive: Internal generic functions
alive: Internal generic functions
all-threads: Exported functions

B
binding-symbols: Internal generic functions
binding-symbols: Internal generic functions
binding-values: Internal generic functions
binding-values: Internal generic functions
bindings-from-alist: Internal functions

C
construct-batched-queue: Internal functions
current-thread: Exported functions

D
destroy-thread: Exported functions

E
empty-p: Internal generic functions
empty-p: Internal generic functions

F
Function, all-threads: Exported functions
Function, bindings-from-alist: Internal functions
Function, construct-batched-queue: Internal functions
Function, current-thread: Exported functions
Function, destroy-thread: Exported functions
Function, future-values: Exported functions
Function, get-join-future: Exported functions
Function, join-thread: Exported functions
Function, make-thread: Exported functions
Function, queue-future: Exported functions
Function, queue-next: Exported functions
Function, queue-next-replace: Internal functions
Function, recv/cc: Exported functions
Function, send/cc: Exported functions
Function, thread-alive-p: Exported functions
Function, thread-loop: Internal functions
Function, thread-name: Exported functions
Function, thread-yield: Exported functions
Function, threadp: Exported functions
Function, wait-on: Exported functions
future-values: Exported functions

G
Generic Function, (setf alive): Internal generic functions
Generic Function, (setf next-action): Internal generic functions
Generic Function, alive: Internal generic functions
Generic Function, binding-symbols: Internal generic functions
Generic Function, binding-values: Internal generic functions
Generic Function, empty-p: Internal generic functions
Generic Function, head: Internal generic functions
Generic Function, join-future: Internal generic functions
Generic Function, name: Internal generic functions
Generic Function, next-action: Internal generic functions
Generic Function, recv: Exported generic functions
Generic Function, send: Exported generic functions
Generic Function, size: Internal generic functions
Generic Function, snoc: Internal generic functions
Generic Function, tail: Internal generic functions
get-join-future: Exported functions

H
head: Internal generic functions
head: Internal generic functions

J
join-future: Internal generic functions
join-future: Internal generic functions
join-thread: Exported functions

M
Macro, with-green-thread: Exported macros
make-thread: Exported functions
Method, (setf alive): Internal generic functions
Method, (setf next-action): Internal generic functions
Method, alive: Internal generic functions
Method, binding-symbols: Internal generic functions
Method, binding-values: Internal generic functions
Method, empty-p: Internal generic functions
Method, head: Internal generic functions
Method, join-future: Internal generic functions
Method, name: Internal generic functions
Method, next-action: Internal generic functions
Method, recv: Exported generic functions
Method, send: Exported generic functions
Method, size: Internal generic functions
Method, snoc: Internal generic functions
Method, tail: Internal generic functions

N
name: Internal generic functions
name: Internal generic functions
next-action: Internal generic functions
next-action: Internal generic functions

Q
queue-future: Exported functions
queue-next: Exported functions
queue-next-replace: Internal functions

R
recv: Exported generic functions
recv: Exported generic functions
recv/cc: Exported functions

S
send: Exported generic functions
send: Exported generic functions
send/cc: Exported functions
size: Internal generic functions
size: Internal generic functions
snoc: Internal generic functions
snoc: Internal generic functions

T
tail: Internal generic functions
tail: Internal generic functions
thread-alive-p: Exported functions
thread-loop: Internal functions
thread-name: Exported functions
thread-yield: Exported functions
threadp: Exported functions

W
wait-on: Exported functions
with-green-thread: Exported macros

Jump to:   (  
A   B   C   D   E   F   G   H   J   M   N   Q   R   S   T   W  

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

A.3 Variables

Jump to:   *  
A   B   F   J   N   R   S   W  
Index Entry  Section

*
*active-threads*: Internal special variables
*current-thread*: Internal special variables
*default-special-bindings*: Exported special variables
*thread-queue*: Internal special variables

A
alive: Internal classes

B
binding-symbols: Internal classes
binding-values: Internal classes

F
front: Internal classes

J
join-future: Internal classes

N
name: Internal classes
next-action: Internal classes

R
rear: Internal classes

S
Slot, alive: Internal classes
Slot, binding-symbols: Internal classes
Slot, binding-values: Internal classes
Slot, front: Internal classes
Slot, join-future: Internal classes
Slot, name: Internal classes
Slot, next-action: Internal classes
Slot, rear: Internal classes
Slot, waiting-to-recv: Exported classes
Slot, waiting-to-send: Exported classes
Special Variable, *active-threads*: Internal special variables
Special Variable, *current-thread*: Internal special variables
Special Variable, *default-special-bindings*: Exported special variables
Special Variable, *thread-queue*: Internal special variables

W
waiting-to-recv: Exported classes
waiting-to-send: Exported classes

Jump to:   *  
A   B   F   J   N   R   S   W  

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

A.4 Data types

Jump to:   B   C   G   P   S   T  
Index Entry  Section

B
batched-queue: Internal classes

C
channel: Exported classes
Class, batched-queue: Internal classes
Class, channel: Exported classes
Class, thread: Internal classes

G
green-threads: The green-threads system
green-threads: The green-threads package
green-threads-asd: The green-threads-asd package

P
Package, green-threads: The green-threads package
Package, green-threads-asd: The green-threads-asd package

S
System, green-threads: The green-threads system

T
thread: Internal classes

Jump to:   B   C   G   P   S   T