Replace spins with proper pthread conditions.
diff --git a/rsLocklessFifo.h b/rsLocklessFifo.h
index ddef382..2f4d5c5 100644
--- a/rsLocklessFifo.h
+++ b/rsLocklessFifo.h
@@ -41,14 +41,32 @@
 
 
 protected:
+    class Signal {
+    public:
+        Signal();
+        ~Signal();
+
+        bool init();
+
+        void set();
+        void wait();
+
+    protected:
+        bool mSet;
+        pthread_mutex_t mMutex;
+        pthread_cond_t mCondition;
+    };
+
     uint8_t * volatile mPut;
     uint8_t * volatile mGet;
     uint8_t * mBuffer;
     uint8_t * mEnd;
     uint8_t mSize;
 
-    pthread_mutex_t mMutex;
-    pthread_cond_t mCondition;
+    Signal mSignalToWorker;
+    Signal mSignalToControl;
+
+
 
 public:
     void * reserve(uint32_t bytes);