13 Commits

Author SHA1 Message Date
Randall Leeds
7e699b7d51 Use trollius on Py2 instead of bundling selectors 2014-05-31 13:31:07 -07:00
Randall Leeds
eb17b13b1d Guard against race condition on threads keepalive
Requests after the first on a keepalive connection remove themselves
from the keepalive timeout queue. This presents a race condition where
the main thread might try to access the first element of the queue
after it has been removed.
2014-05-31 13:30:42 -07:00
benoitc
d775b576e8 improve worker shutdown 2014-05-31 01:21:05 +02:00
benoitc
fb53047b73 fix timeout and socket ssl wrapping 2014-05-31 01:15:05 +02:00
benoitc
e8e9d285a6 fixes 2014-05-31 00:44:20 +02:00
benoitc
5ba749e9ca some quick optimisations 2014-05-31 00:17:29 +02:00
benoitc
c8e93a6f21 make the code simpler and fix issue with ab 2014-05-30 23:26:30 +02:00
benoitc
f8b415496d refactor the gthread worker for a better usage of asyncio
we have the possibility to pass a data payload to the poller when
registering a file object. We are using this possibility to pass a
callback. the callback will either accept or handle a connection when
the read event is triggered.

while I am here make the future result asynchronous so we don't block
the I/O event handling.
2014-05-30 15:59:47 +02:00
benoitc
7f9d745eb5 reuse asyncio code in the threaded worker 2014-05-30 11:07:35 +02:00
benoitc
67800292e0 fix kqueue poller.
this change initialise the event loop after the process has forked so we
make sure to inherit from the file descriptor.

Also fix the number of events we are waiting for. The python
implementation requires a positive number.
2014-05-13 13:57:34 +02:00
benoitc
6aa99e4441 fix keepalive 2014-05-13 12:30:57 +02:00
benoitc
c353eaacee fix ThreadWorker 2014-05-13 10:29:26 +02:00
benoitc
67866f275f add missing gthreads worker 2014-05-13 10:21:48 +02:00