Jump to content

Mutex: Difference between revisions

Added Wren blurb.
m (→‎{{header|8086 Assembly}}: added an additional example and deleted a statement I'm not sure about)
(Added Wren blurb.)
Line 1,282:
 
thread::rwmutex destroy $rw</lang>
 
=={{header|Wren}}==
As Wren's VM is effectively single threaded (only one fiber can run at a time), mutexes are only relevant for embedded scripts where two or more VMs are being run in parallel by the host and the VMs need shared access to some resource.
 
In such a case the host (see [https://github.com/wren-lang/wren/wiki/Language-Bindings here] for those currently available) would almost certainly deal directly with synchronization using whatever mechanisms were available to it and access to the resource would therefore be transparent as far as the Wren scripts were concerned i.e. the latter would not need to acquire or release a lock on the resource themselves.
 
=={{header|zkl}}==
9,490

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.