Commits

a4z committed 09cf529

reldebug configure added

  • Participants
  • Parent commits b4d01d8

Comments (0)

Files changed (2)

File configureRelDebug.sh

+
+BUILDDIR=buildRelDebug
+
+A4SQLT3DIR=$(dirname $(pwd))/a4sqlt3
+
+if [ -d $BUILDDIR ] ; then
+ rm -r $BUILDDIR/*
+else
+ mkdir $BUILDDIR
+fi
+
+
+cd $BUILDDIR && cmake ../ -DCMAKE_BUILD_TYPE=RelDebug \
+-DUSE_BOOSTTESTING_DYNLINK=ON \
+-Da4sqlt3_INCLUDE_DIR=$A4SQLT3DIR/include \
+-Da4sqlt3_LIBRARY_DIR=$A4SQLT3DIR/$BUILDDIR/lib 
+
+

File src/sbbdep/cachedb.cpp

 
   auto persiter =[this](ToStoreData& tostore, DbAction& dbaction){
 
-    while ( tostore.running )
+    while ( tostore.running.load(std::memory_order_relaxed) )
       {
         std::unique_lock<std::mutex> lock(tostore.mtx);
         while (not tostore.newdata)
 
 
   ToStoreData tostore;
-  tostore.running = true ;
+  tostore.running.store(true,std::memory_order_relaxed) ;
 
   // for indexing I need full path, so do this
   StringVec fullnames = toinsert;
     std::unique_lock<std::mutex> monitorlock(tostore.mtx);
     tostore.newdata = true;
     tostore.condition.notify_one();
-    tostore.running = false;
+    tostore.running.store(false, std::memory_order_relaxed);  // might possible be a release cause publishing
     tostore.condition.notify_one(); // just to be sure to not run into troubles
   }