Commit graph

232 commits

Author SHA1 Message Date
Araq
f315b0619c asyncdispatch compiles again on Linux 2015-07-01 11:28:18 +02:00
Araq
28de800d61 Merge branch 'more_concurrency' into devel
Conflicts:
	doc/tut1.txt
	lib/core/locks.nim
	lib/pure/collections/tables.nim
	lib/pure/selectors.nim
2015-06-30 12:50:24 +02:00
Dominik Picheta
615defb1a9 Fixes socket problems on Windows and normalises some names.
Ref #2976. Ref #2003. See news.txt for details.
2015-06-29 20:11:21 +01:00
Dominik Picheta
6109e6a999 Fixes net/asyncdispatch on Windows. Ref #2976. Fixes #2996. 2015-06-25 22:38:17 +01:00
Andrew Yourtchenko
c4a25d23b6 Match the AF of the socket in connect(). 2015-06-24 02:09:21 +02:00
Andrew Yourtchenko
37f50695ee Make asyncdispatch.connectAddr IPv6-aware. 2015-06-24 01:39:58 +02:00
pdw
192ba3bbc0 lib/pure/a-c - Dropped 'T' from types 2015-06-04 13:17:11 +02:00
Araq
21ea8e6913 some progress on making async multithreaded 2015-05-28 12:49:08 +02:00
Philip Witte
c936cf9e8e Fix bug with asyncdispatch.async and discard statements. 2015-05-20 03:34:48 -07:00
pdw
cb6f867495 Fixed 'milliseconds' spelling in code and docs 2015-05-15 20:15:12 -05:00
def
84315c6a9c Revert "Introduce FutureVar[T] to make recvLineInto safer."
This reverts commit 72b4912c84.
2015-04-26 17:01:04 +02:00
Dominik Picheta
f4c1c252a7 Fix asyncdispatch on Windows. 2015-04-24 18:12:13 +01:00
Dominik Picheta
72b4912c84 Introduce FutureVar[T] to make recvLineInto safer.
FutureVar[T] is a new distinct Future type which is designed to be used
for situations where the highest performance is needed. It reduces the
number of Future allocations needed. It acts as a replacement for
'var' params in async procs.

This commit modifies @def-'s PR in order to make it safer. The recvLineInto
procedure has been modified to take a ``FutureVar[string]`` param instead of a
``ptr string`` param.
2015-04-24 17:56:04 +01:00
Kay Zheng
a11a2f0fdb Check for async errors in 2015-04-18 10:27:35 +08:00
Kay Zheng
a7df3ffbe0 Ignore EvError in asyncdispatch.poll(...) for non-windows systems, so that exceptions can be raised from send(...) and recv(...) 2015-04-12 12:59:56 +08:00
yglukhov
c2a52a9849 Fixed SIGPIPE on MacOS 2015-04-08 11:24:53 +03:00
Dominik Picheta
3751019823 Fix infinite recursion when await is in except body. 2015-03-30 00:42:21 +01:00
def
fd4e629905 Rename PNimrodNode to NimNode 2015-03-17 17:50:32 +01:00
def
a4009e32ea Get rid of 'result shadowed' warning for async procs 2015-03-11 12:46:53 +01:00
Araq
d58212ccc5 fixes #1940; code breakage! stricter template evaluation 2015-03-07 15:43:36 +01:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Dominik Picheta
03019849fc Async await try statement fixes. 2015-02-09 23:00:07 +00:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
def
d60d007281 Close async socket on error (instead of looping on epoll_wait with 100% CPU) 2015-01-04 22:59:41 +01:00
Dominik Picheta
c0207dbae2 More deprecation warning fixes (asyncdispatch, uri). 2014-12-26 16:56:19 +00:00
Araq
b7c8063816 fixes #1689 2014-12-10 21:00:02 +01:00
def
f52fd8785f Fix some deprecation warnings caused by renames 2014-11-13 21:34:46 +01:00
Dominik Picheta
baae9bfea8 s/sock/fd/. Fixes #1487. 2014-09-27 17:15:32 +01:00
Dominik Picheta
867dfbfbfa Adds socket creation for arbitrary domain, type and protocol. 2014-09-18 17:03:23 +01:00
Dominik Picheta
6f155af802 Lots of documentation improvements for asyncdispatch.
Ref #1487.
2014-09-12 22:54:02 +01:00
Dominik Picheta
4db6535025 Fixes for new comment handling. 2014-09-09 11:43:54 +01:00
Dominik Picheta
dd33069d59 Implements getCurrentException for try in async procs. Ref #1487. 2014-09-09 01:16:28 +01:00
Dominik Picheta
6689fa68f5 Multiple exception idents in except for async. Ref #1487. 2014-09-08 22:04:09 +01:00
Dominik Picheta
bd542ebea3 Fixes httpclient SSL issue. Implements unbuffered SSL recv. Ref #1487. 2014-09-06 15:29:38 +01:00
Dominik Picheta
52c16a1a79 Implemented asyncfile for Posix. 2014-09-05 21:14:18 +01:00
Dominik Picheta
0f3025e320 Added Windows asyncfile implementation. 2014-09-05 17:36:16 +01:00
Dominik Picheta
f6dc76cfe3 Case sensitivity fixes for Posix. 2014-08-30 15:52:04 +01:00
Dominik Picheta
cff2a0c0b4 Case fixes for network modules. 2014-08-30 11:59:08 +01:00
Dominik Picheta
361657dea4 Merge branch 'devel' into bigbreak
Conflicts:
	lib/pure/ftpclient.nim
2014-08-30 11:58:54 +01:00
Dominik Picheta
85107917f0 Async macro fixes. Added waitFor. 2014-08-29 22:41:52 +01:00
Araq
27869b6c7b big rename 2014-08-28 00:36:14 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Dominik Picheta
a0b2fb5bd7 Implements or and and for futures. Ref #1487. 2014-08-19 20:54:12 +01:00
Dominik Picheta
bd32255f90 Fixes #1158. 2014-08-14 19:03:31 +01:00
Dominik Picheta
ef2f377bfa Added SafeDisconn for accept. 2014-08-10 11:39:37 +01:00
Dominik Picheta
7358fc256f More future debug info. Added new error code to SafeDisconn list. 2014-08-09 20:50:06 +01:00
Dominik Picheta
f8e714bd30 Fixes async on Linux. 2014-08-09 18:10:45 +01:00
Dominik Picheta
4f5f98f0b1 Fixes incorrect async exception handling. Adds sleepAsync.
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.
2014-08-09 17:13:22 +01:00
Dominik Picheta
41bb0bf9dc Added debug code for futures. 2014-07-14 21:06:04 +01:00
Dominik Picheta
2158952917 Linux async fixes. 2014-07-13 22:43:52 +01:00