RosettaCodeData/Task/Mutex/Prolog/mutex-2.pro

2 lines
55 B
Prolog

synchronized_goal(G) :- with_mutex(my_mutex, call(G)).