my bug or libev's? when multi-thread and multi-loop

Marc Lehmann schmorp at schmorp.de
Tue Dec 2 14:30:30 CET 2008


On Tue, Dec 02, 2008 at 04:46:32PM +0800, CodeAll <codeallcn at gmail.com> wrote:
> queue. Each of the worker has a ev_base_new(0).

What is an "ev_base_new(0)"? and which version of libev are you trying
this with?

> 1. I kill -SIGSEGV the process, gdb it, found it's busy on epoll_wait()

The process still exists after SIGSEGV? that means you have a signal
handler for it - what does it do?

> 6. I guess, that maybe something wrong when i using libev in mutil-thread
> env, or some fd are wrongly closed, or some fd are missing but events
> continue coming.

That's most likely a bug in your program - make sure you never call
functions on the same event loop from different threads, OR use locking.

There are also other rules to follow, such as stopping your event watchers
before freeing them etc., but this probably isn't the problem here.

> Sorry for my english.

I find your english quite good :)

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at goof.com
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list