diff options
Diffstat (limited to 'stdlib/source/documentation/lux/control/concurrency/semaphore.lux')
-rw-r--r-- | stdlib/source/documentation/lux/control/concurrency/semaphore.lux | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux index 556406f4d..757bb8692 100644 --- a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux @@ -1,6 +1,6 @@ (.require [library - [lux (.except if loop) + [lux (.except) ["$" documentation] [data [text (.only \n) @@ -8,49 +8,50 @@ [\\library ["[0]" /]]) -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.definition /.semaphore_is_maxed_out) - ($.definition /.barrier) +(def .public documentation + (.List $.Documentation) + (list ($.module /._ + "") - ($.definition /.Semaphore - "A tool for controlling access to resources by multiple concurrent processes.") + ($.definition /.semaphore_is_maxed_out) + ($.definition /.barrier) - ($.definition /.semaphore - "" - [(semaphore initial_open_positions)]) + ($.definition /.Semaphore + "A tool for controlling access to resources by multiple concurrent processes.") - ($.definition /.wait! - (format "Wait on a semaphore until there are open positions." - \n "After finishing your work, you must 'signal' to the semaphore that you're done.") - [(wait! semaphore)]) + ($.definition /.semaphore + "" + [(semaphore initial_open_positions)]) - ($.definition /.signal! - "Signal to a semaphore that you're done with your work, and that there is a new open position." - [(signal! semaphore)]) + ($.definition /.wait! + (format "Wait on a semaphore until there are open positions." + \n "After finishing your work, you must 'signal' to the semaphore that you're done.") + [(wait! semaphore)]) - ($.definition /.Mutex - "A mutual-exclusion lock that can only be acquired by one process at a time.") + ($.definition /.signal! + "Signal to a semaphore that you're done with your work, and that there is a new open position." + [(signal! semaphore)]) - ($.definition /.mutex - "Creates a brand-new mutex." - [(mutex _)]) + ($.definition /.Mutex + "A mutual-exclusion lock that can only be acquired by one process at a time.") - ($.definition /.synchronize! - "Runs the procedure with exclusive control of the mutex." - [(synchronize! mutex procedure)]) + ($.definition /.mutex + "Creates a brand-new mutex." + [(mutex _)]) - ($.definition /.limit - "Produce a limit for a barrier.") + ($.definition /.synchronize! + "Runs the procedure with exclusive control of the mutex." + [(synchronize! mutex procedure)]) - ($.definition /.Limit - "A limit for barriers.") + ($.definition /.limit + "Produce a limit for a barrier.") - ($.definition /.Barrier - "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.") + ($.definition /.Limit + "A limit for barriers.") - ($.definition /.block! - "Wait on a barrier until all processes have arrived and met the barrier's limit.")] - [])) + ($.definition /.Barrier + "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.") + + ($.definition /.block! + "Wait on a barrier until all processes have arrived and met the barrier's limit.") + )) |