Anonymous user
Mutex: Difference between revisions
m
→{{header|Logtalk}}: Add note on dependency
m (→{{header|Logtalk}}: Add note on dependency) |
|||
Line 514:
=={{header|Logtalk}}==
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(slow_print).
|