Commit 7432a2f0 authored by Shane Snyder's avatar Shane Snyder

run timer callbacks on progress pool if necessary

parent 13a368f7
......@@ -100,9 +100,10 @@ int main(int argc, char **argv)
}
/* actually start margo */
/* use a single pool for progress, sleeper, and handler threads */
/* use a single pool for progress and sleeper threads */
/* NOTE: we don't use RPC handlers, so no need for an RPC pool */
/***************************************/
mid = margo_init(pool, pool, hg_context, hg_class);
mid = margo_init(pool, ABT_POOL_NULL, hg_context, hg_class);
for(i=0; i<4; i++)
{
t_ids[i] = i;
......
......@@ -161,9 +161,16 @@ void margo_check_timers(
/* schedule callback on the handler pool */
handler_pool = margo_get_handler_pool(mid);
ret = ABT_thread_create(*handler_pool, cur->cb_fn, cur->cb_dat,
ABT_THREAD_ATTR_NULL, NULL);
assert(ret == ABT_SUCCESS);
if(*handler_pool != ABT_POOL_NULL)
{
ret = ABT_thread_create(*handler_pool, cur->cb_fn, cur->cb_dat,
ABT_THREAD_ATTR_NULL, NULL);
assert(ret == ABT_SUCCESS);
}
else
{
cur->cb_fn(cur->cb_dat);
}
}
ABT_mutex_unlock(timer_inst->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment