diff options
Diffstat (limited to 'stdlib/source/documentation/lux/control/concurrency/semaphore.lux')
-rw-r--r-- | stdlib/source/documentation/lux/control/concurrency/semaphore.lux | 81 |
1 files changed, 35 insertions, 46 deletions
diff --git a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux index 474144fff..91397cb83 100644 --- a/stdlib/source/documentation/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/documentation/lux/control/concurrency/semaphore.lux @@ -1,7 +1,7 @@ (.require [library [lux (.except if loop) - ["$" documentation (.only documentation:)] + ["$" documentation] [data [text (.only \n) ["%" \\format (.only format)]]] @@ -10,60 +10,49 @@ [\\library ["[0]" /]]) -(documentation: /.Semaphore - "A tool for controlling access to resources by multiple concurrent processes.") +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.semaphore_is_maxed_out) + ($.default /.barrier) -(documentation: /.semaphore - "" - [(semaphore initial_open_positions)]) + ($.documentation /.Semaphore + "A tool for controlling access to resources by multiple concurrent processes.") -(documentation: /.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)]) + ($.documentation /.semaphore + "" + [(semaphore initial_open_positions)]) -(documentation: /.signal! - "Signal to a semaphore that you're done with your work, and that there is a new open position." - [(signal! semaphore)]) + ($.documentation /.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)]) -(documentation: /.Mutex - "A mutual-exclusion lock that can only be acquired by one process at a time.") + ($.documentation /.signal! + "Signal to a semaphore that you're done with your work, and that there is a new open position." + [(signal! semaphore)]) -(documentation: /.mutex - "Creates a brand-new mutex." - [(mutex _)]) + ($.documentation /.Mutex + "A mutual-exclusion lock that can only be acquired by one process at a time.") -(documentation: /.synchronize! - "Runs the procedure with exclusive control of the mutex." - [(synchronize! mutex procedure)]) + ($.documentation /.mutex + "Creates a brand-new mutex." + [(mutex _)]) -(documentation: /.limit - "Produce a limit for a barrier.") + ($.documentation /.synchronize! + "Runs the procedure with exclusive control of the mutex." + [(synchronize! mutex procedure)]) -(documentation: /.Limit - "A limit for barriers.") + ($.documentation /.limit + "Produce a limit for a barrier.") -(documentation: /.Barrier - "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.") + ($.documentation /.Limit + "A limit for barriers.") -(documentation: /.block! - "Wait on a barrier until all processes have arrived and met the barrier's limit.") + ($.documentation /.Barrier + "A barrier that blocks all processes from proceeding until a given number of processes are parked at the barrier.") -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [..Semaphore - ..semaphore - ..wait! - ..signal! - ..Mutex - ..mutex - ..synchronize! - ..limit - ..Limit - ..Barrier - ..block! - ($.default /.semaphore_is_maxed_out) - ($.default /.barrier)] + ($.documentation /.block! + "Wait on a barrier until all processes have arrived and met the barrier's limit.")] [])) |