From 48ad51d0402f711e20eedb4b62d93ac0fc644306 Mon Sep 17 00:00:00 2001 From: electron128 Date: Mon, 18 May 2015 08:51:23 +0000 Subject: [PATCH] fixed start of RsThreads git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8271 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/util/rsthreads.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/util/rsthreads.cc b/libretroshare/src/util/rsthreads.cc index 048d2cf5f..b71bd7f35 100644 --- a/libretroshare/src/util/rsthreads.cc +++ b/libretroshare/src/util/rsthreads.cc @@ -84,10 +84,12 @@ void RsThread::start() int err ; + // pthread_create is a memory barrier + // -> the new thread will see mIsRunning = true + mIsRunning = true ; if( 0 == (err=pthread_create(&tid, 0, &rsthread_init, data))) { mTid = tid; - mIsRunning = true ; } else {