summaryrefslogtreecommitdiff
path: root/lib/top_block.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-08-30 03:37:11 -0700
committerJosh Blum2012-08-30 03:37:11 -0700
commit44fb4c04d2ecda3f60fc4f7e31da64cce9ca7a6d (patch)
tree5d3763b241e51adc70b77dabecab654e8372f0d6 /lib/top_block.cpp
parentb7c89402efa81c0a744e8314ad7d328d997b30be (diff)
downloadsandhi-44fb4c04d2ecda3f60fc4f7e31da64cce9ca7a6d.tar.gz
sandhi-44fb4c04d2ecda3f60fc4f7e31da64cce9ca7a6d.tar.bz2
sandhi-44fb4c04d2ecda3f60fc4f7e31da64cce9ca7a6d.zip
use the separate block msgs/topology updates
Diffstat (limited to 'lib/top_block.cpp')
-rw-r--r--lib/top_block.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index 36ff723..9d7a2f0 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -47,22 +47,23 @@ void TopBlock::set_buffer_hint(const size_t hint)
TopBlockMessage event;
event.what = TopBlockMessage::HINT;
event.hint = hint;
- (*this)->executor.update(event);
+ (*this)->executor.post_msg(event);
}
void TopBlock::start(void)
{
+ (*this)->executor.commit();
TopBlockMessage event;
event.what = TopBlockMessage::ACTIVE;
event.token = (*this)->token;
- (*this)->executor.update(event);
+ (*this)->executor.post_msg(event);
}
void TopBlock::stop(void)
{
TopBlockMessage event;
event.what = TopBlockMessage::INERT;
- (*this)->executor.update(event);
+ (*this)->executor.post_msg(event);
}
void TopBlock::run(void)
@@ -76,7 +77,7 @@ void TopBlock::wait(void)
while (not (*this)->token.unique())
{
boost::this_thread::yield();
- sleep(1);
- VAR((*this)->token.use_count());
+ //sleep(1);
+ //VAR((*this)->token.use_count());
}
}