Use of mutex in persistency store

Wouter Beek <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAE1un7PdHXGn8jXmTuGPd+8jou-4FRFXex035Mm7zuNq7SqRzQ@mail.gmail.com>
Hi,

In the documentation for the persistency
library<http://www.swi-prolog.org/pldoc/doc/home/vnc/prolog/lib/swipl/library/persistency.pl>,
the following code occurs:
~~~{.pl}
current_user_role(Name, Role) :-
  with_mutex(user_db, user_role(Name, Role)).
~~~
I do not get the use of with_mutex/1 here. Could reading from the
persistency store cause troubles in another thread, and if so how?

---
Cheers!,
Wouter.

E-mail: [email protected]
WWW: www.wouterbeek.com
Tel.: 0647674624
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.