Jump to content

Mutex: Difference between revisions

6 bytes removed ,  10 years ago
(Add Logtalk implementation)
Line 516:
Logtalk provides a synchronized/0 directive for synchronizing all object (or category) predicates using the same implicit mutex and a synchronized/1 directive for synchronizing a set of predicates using the same implicit mutex. Follow an usage example of the synchronized/1 directive (inspired by the Erlang example):
<lang logtalk>
:- object(mutex_exampleslow_print).
 
:- threaded.
Line 552:
Sample output:
<lang text>
?- mutex_exampleslow_print::start.
abc
123
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.