[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanoslee
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift. |
Date: |
Wed, 15 Apr 2015 21:07:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 4122e96257fd70c8469d0825f3a913ab3af6d16d
Author: Nate Goergen <address@hidden>
Date: Sat Mar 7 14:33:18 2015 -0600
controlport: replacement of nanosleep() with boost::sleep() in startup
thread. Fix of merge error in booter_thrift.
---
gnuradio-runtime/include/gnuradio/thrift_application_base.h | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/gnuradio-runtime/include/gnuradio/thrift_application_base.h
b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
index 65cd83e..c7a57d5 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_application_base.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
@@ -26,6 +26,7 @@
#include <gnuradio/api.h>
#include <gnuradio/logger.h>
#include <gnuradio/thread/thread.h>
+#include <boost/date_time/posix_time/posix_time.hpp>
namespace {
static const unsigned int THRIFTAPPLICATION_ACTIVATION_TIMEOUT_MS(600);
@@ -118,20 +119,13 @@ void thrift_application_base<TserverBase,
TserverClass>::kickoff()
thrift_application_common::d_thread = boost::shared_ptr<gr::thread::thread>
(new
gr::thread::thread(boost::bind(&thrift_application_base::start_thrift,
d_this)));
- ::timespec timer_ts, rem_ts;
- timer_ts.tv_sec = 0; timer_ts.tv_nsec =
THRIFTAPPLICATION_ACTIVATION_TIMEOUT_MS*1000;
-
int iter = 0;
while(!d_this->application_started()) {
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
- ::Sleep(timer_ts.tv_nsec / 1000000);
-#else
- ::nanosleep(&timer_ts, &rem_ts);
-#endif
+
boost::this_thread::sleep(boost::posix_time::milliseconds(THRIFTAPPLICATION_ACTIVATION_TIMEOUT_MS));
if(!d_this->application_started())
std::cerr << "@";
if(iter++ > 100) {
- std::cerr << "thrift_application_base::kickoff(), timeout waiting to
port number might have failed?" << std::endl;
+ std::cerr << "thrift_application_base::c(), timeout waiting to port
number might have failed?" << std::endl;
break;
}
}
- [Commit-gnuradio] [gnuradio] 18/50: controlport: improving transport layer throughput., (continued)
- [Commit-gnuradio] [gnuradio] 18/50: controlport: improving transport layer throughput., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 07/50: controlport: Addes a FindThrift cmake module to find the Thrift headers, libraries, and Python files., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 17/50: controlport: convert to To_PMT registration objects, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 20/50: runtime: more generic version of prefs class., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 22/50: cmake: force QA tests to turn ControlPort off by default., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 15/50: controlport: convert rpcpmtconverter::to_pmt() if statement to a function object map, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 01/50: Initial thrift definition for gnuradio, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 14/50: controlport: Thrift's binary type, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 09/50: controlport: cleanup and switching over to new Python common interface., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 23/50: controlport: cleaning up and using logger to display endpoint., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift.,
git <=
- [Commit-gnuradio] [gnuradio] 28/50: controlport: more cleaning up., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 31/50: controlport: moving the logger call that publishes Thrift's endpoint to i_impl()., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 24/50: controlport: adding performance and controlport monitor GRC blocks., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 29/50: controlport: changing the default port number on the Thrift interface to zero., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 21/50: controlport: Adds ability to configure Thrift through a config file, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 30/50: controlport: ephemeral / unused port number selection by OS working., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 13/50: controlport: using threaded server for multiple connections., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 39/50: controlport: documentation cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 35/50: controlport: cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 33/50: controlport: more cleanup and conveniences, git, 2015/04/16