Author: niels
Date: Tue May 27 16:11:47 2014
New Revision: 9471
URL: http://svn.gna.org/viewcvs/service-tech?rev=9471&view=rev
Log:
* removed a deadlock in the symmetry calculation thread logic
Modified:
trunk/lola2/src/Symmetry/Constraints.cc
Modified: trunk/lola2/src/Symmetry/Constraints.cc
URL:
http://svn.gna.org/viewcvs/service-tech/trunk/lola2/src/Symmetry/Constraints.cc?rev=9471&r1=9470&r2=9471&view=diff
==============================================================================
--- trunk/lola2/src/Symmetry/Constraints.cc (original)
+++ trunk/lola2/src/Symmetry/Constraints.cc Tue May 27 16:11:47 2014
@@ -1408,6 +1408,23 @@
// - test all possible images (taken from constraint #c_min)...
// - ... for the argument in the singleton constraint at
cardConstraints[thr]-1
pthread_t my_thread;
+
+ // in case the calculation of symmetries is aborted, do not start the
+ // prepared thread, but return here
+ if (stop)
+ {
+ // check out this thread
+ pthread_mutex_lock(&rt_mutex);
+ MyTicket -> next = freeThreads;
+ freeThreads = MyTicket;
+ assert(freeThreads != NULL);
+ // wake up main thread that may wait for thread to complete
+ pthread_cond_signal(&thread_cond);
+ pthread_mutex_unlock(&rt_mutex);
+
+ return;
+ }
+
pthread_create(&my_thread, NULL, ExploreSymmetryThread, (void *) MyTicket);
// Now, dive down to identity
--
You received this e-mail, because you subscribed the mailing list
"service-tech-commits" which will forward you any e-mail addressed to
[email protected]. If you want to unsubscribe or make any changes to
your subscription, please go to
https://mail.gna.org/listinfo/service-tech-commits.