The tasyncexceptions test has been added which tests for this incorrect
exception handling behaviour. The problem was that the exception was
raised inside a callback which was called from a previously finished async
procedure. This caused a "Future already finished" error. The fix was to
simply reraise the exception if the retFutureSym is already finished.
sleepAsync was added to help with the reproduction of this test. It should
also be useful for users however.
Finally some debug information was added to futures to help with future
bugs.
* 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 was done as a safety measure against futures which may be
accidentally discarded when they have an exception leading the exception
being silently forgotten. Unfortunately we will need to come up with
some other solution.
``return`` is now transformed into a ``return nil`` in the async iterator
to work around the no-yield in ``try .. except ..`` closure iterator
limitation.
asyncdispatch.recv no longer guarantees that it will read ALL the data
requested. The underlying WinAPI function doesn't guarantee this and it
already wasn't guaranteed anyway since the socket could disconnect
mid-transmission.