Re: [Libevent-users] Multi-Threaded Libevent Server Example

2012-03-25 Thread Mark Heily
On 03/25/2012 02:05 PM, Ron Cemer wrote: I've developed a multi-threaded, libevent-based socket server example which uses a threaded work queue and a separate event queues (event_base in libevent terminology) for each client connection. This should provide better CPU utilization on hyperthreadin

Re: [Libevent-users] Asynchronous writes in the event loop model

2012-02-06 Thread Mark Heily
On 02/06/2012 04:46 PM, Adrian Chadd wrote: Hi, the standard trick: * designate one thread as "signals here" and block signals on all other threads; * use pipes for sending signals between threads (ie, to wake them up); * wish that kqueue and similar methods were portable. The kqueue API has

[Libevent-users] libevent + libpthread_workqueue = EV_PARALLEL

2012-01-09 Thread Mark Heily
See attached for an experimental patch that adds a new flag EV_PARALLEL for the ev_events field of 'struct event'. If this flag is turned on, the callback will be invoked asynchronously using a threadpool. The caller is responsible for ensuring that the callback function can safely be executed

[Libevent-users] [BUG] casting from evutil_socket_t to int

2012-01-08 Thread Mark Heily
I found a couple of places in event.c where the 'ev_fd' field of 'struct event' is cast from evutil_socket_t to an int. This field is a 64-bit pointer on 64-bit versions of MS Windows, and should not be cast to a 32-bit integer. See below for details. Regards, - Mark event.c:1361:(*e