mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 14:57:36 +02:00
Revised newer sections
This commit is contained in:
parent
c51fb226ce
commit
f7717d25ab
1 changed files with 4 additions and 4 deletions
|
@ -200,11 +200,11 @@ Based on the procedure of the same name from Clojure.
|
|||
|
||||
## Delays
|
||||
|
||||
A delay is created to execute code at a later time. When the result is required any thread can call `deref` to generate it. Once executed the result is cached so it is available for other threads.
|
||||
A delay stores code that will not be executed until dereferenced via `deref`. The result is then cached.
|
||||
|
||||
Delays are based on delay objects from Clojure.
|
||||
|
||||
Note delays are referred to as `shared-delay` in the code to differentiate them from the single-threaded `delay` provided by `(scheme lazy)`.
|
||||
Note delays are referred to as `shared-delay` to differentiate them from the single-threaded `delay` provided by `(scheme lazy)`.
|
||||
|
||||
### shared-delay?
|
||||
|
||||
|
@ -228,11 +228,11 @@ Create a delay object that will execute `thunk` when dereferenced.
|
|||
|
||||
## Promises
|
||||
|
||||
A promise allows one or more threads to wait for a value to be generated by another thread. When `deref` is called on a promise the calling thread will block until a value is delivered to the promise, via another thread calling `deliver`.
|
||||
A promise allows one or more threads to wait for a value to be generated by another thread. When `deref` is called on a promise the calling thread blocks until a value is delivered to the promise, via another thread calling `deliver`.
|
||||
|
||||
Promises are based off of promise objects from Clojure.
|
||||
|
||||
Note promises are referred to as `shared-promise` in the code to differentiate them from the single-threaded promise functionality provided by `(scheme lazy)`.
|
||||
Note promises are referred to as `shared-promise` to differentiate them from the single-threaded functionality provided by `(scheme lazy)`.
|
||||
|
||||
### shared-promise?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue