Re: About free watcher in callback function

2012-07-16 Thread Marc Lehmann
On Mon, Jul 16, 2012 at 09:57:55AM +0800, 钱晓明 mailtoanta...@163.com wrote: Hi, if my ev_io watcher is allocated by malloc(), can I stop it and free() it in its read/write callback function? After returned from callback function, dose libev still access this watcher? On Mon, Jul 16, 2012 at

Re: about a multi-ev_loop server

2012-07-16 Thread Marc Lehmann
On Mon, Jul 16, 2012 at 08:48:01AM +0800, debuguo waterawo...@gmail.com wrote: In accept ev_loop I put a pair of ev_io and ev_timer to monitor the file descriptor returned from socket, once the ev_io get EV_READ event, the server accept the connect and get the file descriptor, then dispatch it