]> git.lyx.org Git - lyx.git/blobdiff - src/support/forkedcallqueue.C
hopefully fix tex2lyx linking.
[lyx.git] / src / support / forkedcallqueue.C
index 378de1af5ce9c52cd9266fea6b00c2e117804290..38b35ba8beb9c919d8eeeee2e32da71791e5d1d0 100644 (file)
@@ -4,19 +4,25 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Alfredo Braunstein (based on an idea from Angus Leeming)
- * 
- * Full author contact details are available in file CREDITS
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
-#include "forkedcallqueue.h"
+#include <config.h>
+
+#include "support/forkedcallqueue.h"
 
 #include "debug.h"
 
 #include <boost/bind.hpp>
-#include <boost/signals/signal2.hpp>
 
+
+using std::string;
 using std::endl;
-using std::queue;
+
+
+namespace lyx {
+namespace support {
 
 ForkedCallQueue & ForkedCallQueue::get()
 {
@@ -44,7 +50,7 @@ void ForkedCallQueue::callNext()
        Process pro = callQueue_.front();
        callQueue_.pop();
        // Bind our chain caller
-       pro.second->connect(boost::bind(&ForkedCallQueue::callback, 
+       pro.second->connect(boost::bind(&ForkedCallQueue::callback,
                                         this, _1, _2));
        Forkedcall call;
        // If we fail to fork the process, then emit the signal
@@ -57,7 +63,7 @@ void ForkedCallQueue::callNext()
 
 void ForkedCallQueue::callback(pid_t, int)
 {
-       if(callQueue_.empty()) {
+       if (callQueue_.empty()) {
                stopCaller();
        } else {
                callNext();
@@ -67,7 +73,7 @@ void ForkedCallQueue::callback(pid_t, int)
 ForkedCallQueue::ForkedCallQueue() : running_(false)
 {}
 
-       
+
 void ForkedCallQueue::startCaller()
 {
        lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: waking up" << endl;
@@ -79,7 +85,7 @@ void ForkedCallQueue::startCaller()
 void ForkedCallQueue::stopCaller()
 {
        running_ = false ;
-       lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: I'm going to sleep" 
+       lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: I'm going to sleep"
                                << endl;
 }
 
@@ -88,3 +94,6 @@ bool ForkedCallQueue::running() const
 {
        return running_ ;
 }
+
+} // namespace support
+} // namespace lyx