discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

work function sleep


From: Perkins, Daniel (US)
Subject: work function sleep
Date: Tue, 7 Jun 2022 12:43:48 +0000

The blocks coding guide (https://wiki.gnuradio.org/index.php/BlocksCodingGuide) suggests that if a blocking function must be used in the work function, that a boost thread call such as sleep should be used.  In my case, I am reading IQ data from a socket using the recvfrom function that I can call as a non-blocking function in a loop containing a sleep function.  Is the following sleep function the right one?

 

boost::this_thread::sleep_for(boost::chrono::milliseconds(10))

 

When I attempt to use this, I get a run-time error message stating  that_ZN5boost6chrono12steady_clkck3nowEv is an undefined symbol.  I expect that this is a linker error.  I have included boost_system in my list of target_link_libraries.  I’m just not sure if this is even the recommended sleep function to call.  Is there another preferred method? 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]