[gecode-users] Thread-safe space copying
Christian Schulte
cschulte at kth.se
Fri May 29 13:58:18 CEST 2009
Hi,
No operation in Gecode is thread safe (by design). So, when you want to
create a clone of a space, only one thread can do that at a time (and you
have make sure that clone is called with false as argument for share). If
that turns out to be a bottleneck for your application: if you have created
an unshared clone c from a space s, then of course two threads can create
clones in parallel: one from c and one from s.
Christian
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Jérémie Vautard
Sent: Friday, May 29, 2009 1:46 PM
To: gecode list
Subject: [gecode-users] Thread-safe space copying
Hi all,
I have several threads that might clone a same Gecode::Space object at the
same time. Is the Space.clone(...) method thread safe, or should I ensure
that it is never concurently called ?
Cheers,
--
Jérémie Vautard
Doctorant/Ph-D Student
LIFO - Laboratoire d'Informatique Fondamentale d'Orléans
Batiment IIIA
Rue Léonard de Vinci
B.P. 6759
F-45067 ORLEANS Cedex 2
Tel: (+33) 02 38 49 48 57
Cell: (+33) 06 65 11 51 7(
http://www.univ-orleans.fr/lifo/Membres/vautard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090529/16f89688/attachment.htm>
More information about the gecode-users
mailing list