could anyone tell me about how to exit the program using libev
Marc Lehmann
schmorp at schmorp.de
Thu Jun 28 11:46:45 CEST 2012
On Thu, Jun 28, 2012 at 04:51:38PM +0800, debuguo <wateraworld at gmail.com> wrote:
> I have stop all the watchers in the loop, and called the ev_break() in one
> thread, and another thread(containing the ev_run) will still execute the
> ev_run and write callback.
You cannot call ev_break from another thread - a loop is a shared resource,
and would need to be locked properly.
> I don't know why and I want to exit the program properly.
To properly exit a program, you can just call exit() or some os-specific
call. You don't havw to call ev_break or anything libev-related.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the libev
mailing list