Serializing FillPipeline in Fetcher
:
diff --git a/src/fetcher.cc b/src/fetcher.cc
index b7f6e35..65b0ed8 100644
--- a/src/fetcher.cc
+++ b/src/fetcher.cc
@@ -64,11 +64,14 @@
, m_activePipeline (0)
, m_retryPause (0)
, m_nextScheduledRetry (date_time::second_clock<boost::posix_time::ptime>::universal_time ())
+ , m_executor (1) // must be 1
{
+ m_executor.start ();
}
Fetcher::~Fetcher ()
{
+ m_executor.shutdown ();
}
void
@@ -79,10 +82,7 @@
// cout << "Restart: " << m_minSendSeqNo << endl;
m_lastPositiveActivity = date_time::second_clock<boost::posix_time::ptime>::universal_time();
- // Scheduler::scheduleOneTimeTask ();
- // m_scheduler
- // m_executor.execute (bind (&Fetcher::FillPipeline, this));
- FillPipeline ();
+ m_executor.execute (bind (&Fetcher::FillPipeline, this));
}
void
@@ -192,8 +192,7 @@
}
else
{
- FillPipeline ();
- // m_executor.execute (bind (&Fetcher::FillPipeline, this));
+ m_executor.execute (bind (&Fetcher::FillPipeline, this));
}
}