Many async optimisations.
* Selectors implementation will now attempt to immediately execute an IO operation instead of waiting for a ready notification. * Removed recursion in asynchttpserver. * Improved buffered implementation of recvLine in asyncnet. * Optimised ``respond`` in asynchttpserver removing a possible "Delayed ACK" situation.
This commit is contained in:
parent
c260b22fbc
commit
cf5c8a204e
4 changed files with 166 additions and 116 deletions
|
|
@ -163,7 +163,7 @@ elif defined(linux):
|
|||
proc newSelector*(): PSelector =
|
||||
new result
|
||||
result.epollFD = epoll_create(64)
|
||||
result.events = cast[array[64, epoll_event]](alloc0(sizeof(epoll_event)*64))
|
||||
#result.events = cast[array[64, epoll_event]](alloc0(sizeof(epoll_event)*64))
|
||||
result.fds = initTable[TSocketHandle, PSelectorKey]()
|
||||
if result.epollFD < 0:
|
||||
OSError(OSLastError())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue