Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Paton J. Lewis
At 8/14/2012 01:21 PM, Christof Meerwald wrote: Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] > My first concern is about code clarity. Using a custom event to > delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item > requires that functionality

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Christof Meerwald
Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] > My first concern is about code clarity. Using a custom event to > delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item > requires that functionality to be split across two areas of code: > the code

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Christof Meerwald
Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] My first concern is about code clarity. Using a custom event to delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item requires that functionality to be split across two areas of code: the code that

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-14 Thread Paton J. Lewis
At 8/14/2012 01:21 PM, Christof Meerwald wrote: Hi Paton, On Thu, Aug 02, 2012 at 06:37:06PM -0700, Paton J. Lewis wrote: [...] My first concern is about code clarity. Using a custom event to delete an event type (either EPOLLIN or EPOLLOUT) from an epoll item requires that functionality to

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-02 Thread Paton J. Lewis
Christof, I notice that Windows (via I/O Completion Ports) and both BSD and OS/X (via kqueue) all appear to have support for both of the concepts we have been discussing: 1) the ability to disable epoll items, and 2) the ability to send custom events. This suggests that either solution may

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-08-02 Thread Paton J. Lewis
Christof, I notice that Windows (via I/O Completion Ports) and both BSD and OS/X (via kqueue) all appear to have support for both of the concepts we have been discussing: 1) the ability to disable epoll items, and 2) the ability to send custom events. This suggests that either solution may

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-07-09 Thread Christof Meerwald
On Fri, Jun 29, 2012 at 02:43:06PM -0700, Paton J. Lewis wrote: > At 6/19/2012 11:17 AM, Christof Meerwald wrote: > >But, taking one step back - wouldn't an alternative approach be to add > >some mechanism to allow a thread to post a user-event for an fd? So in > >delete_epoll_item you would post

Re: [PATCH] epoll: Improved support for multi-threaded clients

2012-07-09 Thread Christof Meerwald
On Fri, Jun 29, 2012 at 02:43:06PM -0700, Paton J. Lewis wrote: At 6/19/2012 11:17 AM, Christof Meerwald wrote: But, taking one step back - wouldn't an alternative approach be to add some mechanism to allow a thread to post a user-event for an fd? So in delete_epoll_item you would post a user