This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via 788dacae0d6d281ad9890014cab2c9c3e2986d1f (commit) from fc89005c7aff08285b56a9b9f6e8e803fa57125e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 788dacae0d6d281ad9890014cab2c9c3e2986d1f Author: Phil Carns <[email protected]> Date: Thu Aug 18 10:26:46 2011 -0400 bug fix to ae_poll_break() re: #147 ----------------------------------------------------------------------- Summary of changes: code/src/aesop/resource.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) Diff of changes: diff --git a/code/src/aesop/resource.c b/code/src/aesop/resource.c index b2a5309..905dd49 100644 --- a/code/src/aesop/resource.c +++ b/code/src/aesop/resource.c @@ -189,14 +189,6 @@ void ae_poll_break(ae_context_t context) ev_async* breaker = NULL; struct ev_loop *target_loop = NULL; - if(pthread_equal(ev_loop_thread, pthread_self())) - { - /* this was called from the event loop thread, so we know that it is - * already awake - */ - return; - } - if(context) { breaker = &context->eloop_breaker; @@ -208,6 +200,16 @@ void ae_poll_break(ae_context_t context) target_loop = eloop; } + if(pthread_equal(ev_loop_thread, pthread_self())) + { + /* this was called from the event loop thread, so we know that it is + * already awake. Just make sure that it exits if the + * ae_poll_break() as called from a libev callback. + */ + ev_break(target_loop, EVBREAK_ONE); + return; + } + ev_async_send(target_loop, breaker); } hooks/post-receive -- Triton Repository