Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chuck cranor
margo
Commits
7432a2f0
Commit
7432a2f0
authored
Apr 19, 2016
by
Shane Snyder
Browse files
run timer callbacks on progress pool if necessary
parent
13a368f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/sleep.c
View file @
7432a2f0
...
...
@@ -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
;
...
...
src/margo-timer.c
View file @
7432a2f0
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment