From cb1b19fa9bc95177d41edb498ef1e2a20c105292 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 19 Feb 2008 11:37:02 -0600 Subject: [PATCH] Fix semaphores, fix docs --- extra/concurrency/semaphores/semaphores.factor | 2 +- extra/help/handbook/handbook.factor | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extra/concurrency/semaphores/semaphores.factor b/extra/concurrency/semaphores/semaphores.factor index b2c99ba6e7..e4b07de8a6 100755 --- a/extra/concurrency/semaphores/semaphores.factor +++ b/extra/concurrency/semaphores/semaphores.factor @@ -8,7 +8,7 @@ TUPLE: semaphore count threads ; : ( n -- semaphore ) dup 0 < [ "Cannot have semaphore with negative count" throw ] when - 0 semaphore construct-boa ; + semaphore construct-boa ; : wait-to-acquire ( semaphore timeout -- ) >r semaphore-threads r> wait ; diff --git a/extra/help/handbook/handbook.factor b/extra/help/handbook/handbook.factor index 4bf78ffa80..837d69d59d 100755 --- a/extra/help/handbook/handbook.factor +++ b/extra/help/handbook/handbook.factor @@ -84,7 +84,6 @@ USING: concurrency.combinators concurrency.messaging concurrency.promises concurrency.futures -concurrency.distributed concurrency.locks concurrency.semaphores concurrency.count-downs @@ -102,12 +101,12 @@ $nl { $subsection "concurrency.promises" } { $subsection "concurrency.futures" } { $subsection "concurrency.messaging" } -{ $subsection "concurrency.distributed" } "Shared-state abstractions:" { $subsection "concurrency.locks" } { $subsection "concurrency.semaphores" } { $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" "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."