[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 10/18: runtime: delete blocking wait for me
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 10/18: runtime: delete blocking wait for message |
Date: |
Fri, 1 Jul 2016 16:25:45 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next
in repository gnuradio.
commit 5197311dd22744b784ff9ae2cd965a26ef04f4a4
Author: Bastian Bloessl <address@hidden>
Date: Thu Apr 28 15:33:14 2016 +0200
runtime: delete blocking wait for message
this is always bad practice
---
gnuradio-runtime/include/gnuradio/basic_block.h | 7 -------
gnuradio-runtime/lib/basic_block.cc | 23 -----------------------
2 files changed, 30 deletions(-)
diff --git a/gnuradio-runtime/include/gnuradio/basic_block.h
b/gnuradio-runtime/include/gnuradio/basic_block.h
index 25d9fb5..fa454c9 100644
--- a/gnuradio-runtime/include/gnuradio/basic_block.h
+++ b/gnuradio-runtime/include/gnuradio/basic_block.h
@@ -252,13 +252,6 @@ namespace gr {
*/
pmt::pmt_t delete_head_nowait( pmt::pmt_t which_port);
- /*!
- * \param[in] which_port The message port from which to get the message.
- * \param[in] millisec Optional timeout value (0=no timeout).
- * \returns returns pmt at head of queue or pmt::pmt_t() if empty.
- */
- pmt::pmt_t delete_head_blocking(pmt::pmt_t which_port, unsigned int
millisec = 0);
-
msg_queue_t::iterator get_iterator(pmt::pmt_t which_port) {
return msg_queue[which_port].begin();
}
diff --git a/gnuradio-runtime/lib/basic_block.cc
b/gnuradio-runtime/lib/basic_block.cc
index 082d075..89aa9b8 100644
--- a/gnuradio-runtime/lib/basic_block.cc
+++ b/gnuradio-runtime/lib/basic_block.cc
@@ -228,29 +228,6 @@ namespace gr {
}
pmt::pmt_t
- basic_block::delete_head_blocking(pmt::pmt_t which_port, unsigned int
millisec)
- {
- gr::thread::scoped_lock guard(mutex);
-
- if (millisec) {
- boost::system_time const timeout = boost::get_system_time() +
boost::posix_time::milliseconds(millisec);
- while (empty_p(which_port)) {
- if (!msg_queue_ready[which_port]->timed_wait(guard, timeout)) {
- return pmt::pmt_t();
- }
- }
- } else {
- while(empty_p(which_port)) {
- msg_queue_ready[which_port]->wait(guard);
- }
- }
-
- pmt::pmt_t m(msg_queue[which_port].front());
- msg_queue[which_port].pop_front();
- return m;
- }
-
- pmt::pmt_t
basic_block::message_subscribers(pmt::pmt_t port)
{
return pmt::dict_ref(d_message_subscribers,port,pmt::PMT_NIL);
- [Commit-gnuradio] [gnuradio] 05/18: runtime: whitespace, (continued)
- [Commit-gnuradio] [gnuradio] 05/18: runtime: whitespace, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 01/18: runtime: remove unnecessary wakeup of neighbors, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 13/18: runtime: scheduler: check changed at beginning, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 16/18: runtime: poll blocks, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 12/18: runtime: tpb, don't check msg queue, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 11/18: runtime: scheduler: no busy-waiting, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 14/18: runtime: scheduler: check for messages at start of iteration, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 09/18: blocks: don't block waiting for messages, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 15/18: runtime: del left-over from blocked out, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 18/18: Merge remote-tracking branch 'bastibl/shutdown' into next, git, 2016/07/01
- [Commit-gnuradio] [gnuradio] 10/18: runtime: delete blocking wait for message,
git <=