summaryrefslogtreecommitdiff
path: root/lib/top_block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/top_block.cpp')
-rw-r--r--lib/top_block.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index ee3f0e8..515d898 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -98,6 +98,8 @@ void TopBlock::wait(void)
//however, thread group cant be joined twice and this breaks some qa code
//(*this)->thread_group->join_all();
+ //QA lockup detection setup
+ const bool lockup_debug = getenv("GRAS_LOCKUP_DEBUG") != NULL;
boost::system_time check_done_time = boost::get_system_time();
bool has_a_done = false;
@@ -105,19 +107,19 @@ void TopBlock::wait(void)
while (not (*this)->token.unique())
{
wait_thread_yield();
- if (boost::get_system_time() > check_done_time)
+ if (lockup_debug and boost::get_system_time() > check_done_time)
{
if (has_a_done)
{
std::cerr << this->query("{\"path\":\"/topology.dot\"}") << std::endl;
- check_done_time += boost::posix_time::seconds(2);
+ check_done_time += boost::posix_time::seconds(3);
}
BOOST_FOREACH(Apology::Worker *w, (*this)->executor->get_workers())
{
BlockActor *actor = dynamic_cast<BlockActor *>(w->get_actor());
if (actor->data->block_state == BLOCK_STATE_DONE) has_a_done = true;
}
- check_done_time += boost::posix_time::seconds(1);
+ check_done_time += boost::posix_time::seconds(2);
}
}
}