Anonymous user
Mutex: Difference between revisions
→{{header|Logtalk}}
(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(
:- threaded.
Line 552:
Sample output:
<lang text>
?-
abc
123
|