please check this; it might be a mistake otherwise please explain: Running the code
Code: Select all
class facts
myMutex : mutex := mutex::create(false).
clauses
run() :-
%stdIO::write(toBoolean(myMutex:isSet())),
myMutex:release().Apparently, isSet/0 changes the state of the mutex. Yet the name suggests that the predicate is merely intended to query the state.
