* 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()
{
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
void ForkedCallQueue::callback(pid_t, int)
{
- if(callQueue_.empty()) {
+ if (callQueue_.empty()) {
stopCaller();
} else {
callNext();
ForkedCallQueue::ForkedCallQueue() : running_(false)
{}
-
+
void ForkedCallQueue::startCaller()
{
lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: waking up" << endl;
void ForkedCallQueue::stopCaller()
{
running_ = false ;
- lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: I'm going to sleep"
+ lyxerr[Debug::GRAPHICS] << "ForkedCallQueue: I'm going to sleep"
<< endl;
}
{
return running_ ;
}
+
+} // namespace support
+} // namespace lyx