Fix semaphores, fix docs
parent
d657821f3e
commit
cb1b19fa9b
|
|
@ -8,7 +8,7 @@ TUPLE: semaphore count threads ;
|
||||||
|
|
||||||
: <semaphore> ( n -- semaphore )
|
: <semaphore> ( n -- semaphore )
|
||||||
dup 0 < [ "Cannot have semaphore with negative count" throw ] when
|
dup 0 < [ "Cannot have semaphore with negative count" throw ] when
|
||||||
0 <dlist> semaphore construct-boa ;
|
<dlist> semaphore construct-boa ;
|
||||||
|
|
||||||
: wait-to-acquire ( semaphore timeout -- )
|
: wait-to-acquire ( semaphore timeout -- )
|
||||||
>r semaphore-threads r> wait ;
|
>r semaphore-threads r> wait ;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,6 @@ USING: concurrency.combinators
|
||||||
concurrency.messaging
|
concurrency.messaging
|
||||||
concurrency.promises
|
concurrency.promises
|
||||||
concurrency.futures
|
concurrency.futures
|
||||||
concurrency.distributed
|
|
||||||
concurrency.locks
|
concurrency.locks
|
||||||
concurrency.semaphores
|
concurrency.semaphores
|
||||||
concurrency.count-downs
|
concurrency.count-downs
|
||||||
|
|
@ -102,12 +101,12 @@ $nl
|
||||||
{ $subsection "concurrency.promises" }
|
{ $subsection "concurrency.promises" }
|
||||||
{ $subsection "concurrency.futures" }
|
{ $subsection "concurrency.futures" }
|
||||||
{ $subsection "concurrency.messaging" }
|
{ $subsection "concurrency.messaging" }
|
||||||
{ $subsection "concurrency.distributed" }
|
|
||||||
"Shared-state abstractions:"
|
"Shared-state abstractions:"
|
||||||
{ $subsection "concurrency.locks" }
|
{ $subsection "concurrency.locks" }
|
||||||
{ $subsection "concurrency.semaphores" }
|
{ $subsection "concurrency.semaphores" }
|
||||||
{ $subsection "concurrency.count-downs" }
|
{ $subsection "concurrency.count-downs" }
|
||||||
{ $subsection "concurrency.exchangers" } ;
|
{ $subsection "concurrency.exchangers" }
|
||||||
|
"Other concurrency abstractions include " { $vocab-link "concurrency.distributed" } " and " { $vocab-link "channels" } "." ;
|
||||||
|
|
||||||
ARTICLE: "objects" "Objects"
|
ARTICLE: "objects" "Objects"
|
||||||
"An " { $emphasis "object" } " is any datum which may be identified. All values are objects in Factor. Each object carries type information, and types are checked at runtime; Factor is dynamically typed."
|
"An " { $emphasis "object" } " is any datum which may be identified. All values are objects in Factor. Each object carries type information, and types are checked at runtime; Factor is dynamically typed."
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue