EPOLLEXCLUSIVE is mostly useful in a multi-threaded context, to avoid
the thundering herd problem when a FD is registered in several poll
sets managed by several threads,

The above benchmark you give is for uWSGI and meinheld which are
implemented in C, probably using multiple threads,

I'm not opposed to adding this to the selectors, but arguably
selectors are made to be used from Python, where the GIL is going to
limit you much before the thundering herd.

Do you actually have a benchmark showing an improvement?



2016-04-01 14:29 GMT+01:00 Naoki INADA <[email protected]>:
> I made pull request for this.
>
> https://github.com/python/asyncio/pull/330
>
> Request for comments.
>
>
> On Friday, April 1, 2016 at 10:06:04 PM UTC+9, Naoki INADA wrote:
>>>
>>>
>>> poller.register(listenfd, selectors.EVENT_READ_EXCLUSIVE, data)   # Add
>>> EVENT_READ_EXCLUSIVE and EVENT_READ_EXCLUSIVE.
>>>
>>
>> This should be:
>>
>>  poller.register(listenfd, selectors.EVENT_READ | selectors.EXCLUSIVE,
>> data)
>>
>

Reply via email to