* Initial commit.
* Some fixes.
* More fixes.
* Add first test.
* Further fixes for MacOS/BSD.
* Fixes for Linux.
* Add proper tests.
* Lower number of tests.
* Add threadsync tests to test suite.
* There is no need to run tests when threads are off.
* Address review comments.
Fix the issue with multiple signals.
Add tests.
* Switch to use socketpair() instead of pipes.
Fix semaphoring issue on MacOS/BSD.
Add tests.
* Add single threaded fire/wait tests.
* Refactor chronos trackers to be more simple.
* Refactor trackers.
Add HTTP server trackers.
Refactor HTTP main processing loop.
* Compatibility fixes.
Add checkLeaks().
* Fix posix test issue.
* Add httpdebug module which introduces HTTP connection dumping helpers.
Add tests for it.
* Recover and deprecate old version of Trackers.
* Make public iterators to iterate over all tracker counters available.
Fix asynctests to use public iterators instead private one.
* fix EpollEvent memory layout
on x86_64, `EpollEvent` is packed - the upstream version is correct here
* copy-paste upstream instead
* Adjust lines to be 80 characters per line.
---------
Co-authored-by: cheatfate <eugene.kabanov@status.im>
* Disable HTTP/1.1 pipeline support for HTTP/S server by default.
Add tests.
* Fix tests according to new behavior.
Fix tests to use random assigned OS ports instead of predefined.
* Fix flaky tests in testasyncstream.
* move `Future[T]` into its own module along with some basic accessors
* mark all fields internal, exposing only read-only versions under the
old names
* introduce `init`/`completed`/etc as a way of creating a future (vs
newFuture)
* introduce `LocationKind` for `SrcLoc` access
* don't expose `FutureList` unless future tracking is enabled
* introduce `chronosStrictFutureAccess` which controls a number of
additional `Defect` being raised when accessing Future fields in the
wrong state - this will become true in a future version
In this version, `Future[T]` backwards compatibility code remains in
`asyncfutures2` meaning that if only `chronos/futures` is imported, only
"new" API is available.
This branch is a refinement / less invasive / minimal version of
https://github.com/status-im/nim-chronos/pull/373.
* Initial Windows asyncproc part.
Deprecate usage of net/nativesockets in handles, asyncloop.
Introduce primitives with inheritable flag.
* Some posix fixes.
* More duplicate fixes.
* Fix AsyncProcessOption.EchoCommand option.
Remove isMainModule code.
Fix execCommand to use AsyncProcessOption.EvalCommand.
* Initial asyncproc tests commit.
* Some Posix fixes.
* Fix Posix crash.
* Add testsuite.
Fix osnet.nim to use proper declarations.
Fix timer.nim to use proper declarations.
Add Windows environment handling procedures.
Fix createAsyncPipe.
Add leaks tracking for AsyncProcessRef.
* Fix O_CLOEXEC constant value.
* Add file descriptors leak test.
* Remove commented code.
Refactor exceptions.
Fix compilation warnings.
* No exception ioselectors_kqueue initial commit.
* Some BSD fixes.
Linux refactoring of selectors.nim.
* Some fixes to move further.
* Last Linux fixes.
* Fixes for asyncloop to use 2nd version of selectors api.
* Add osutils.nim.
* Some fixes.
* Hardening resumeRead(), resumeWrite() and consumers.
Add ESRCH handling.
Introduce no-exception fromPipe2.
* Make Windows part exception-free and fix zombie race issue.
* createStreamServer() fixes.
* Upgrade asyncproc to use non-exception primitives.
Fix ioselectors_kqueue to use closeFd().
* Refactor accept() and acceptLoop() to be exception free.
* Deprecated some `result` usage.
Last fixes to make stream.nim exception free.
Use closeFd().
Refactor some loops to use handleEintr().
* Fix connect() forgot to unregister socket on error.
* All createAsyncSocket() sockets should be closed with unregisterAndCloseFd().
* Attempt to fix posix bug with incomplete output.
* Change number of runs in big test.
* Refactoring pipes creation. Attempt to fix "write error: Resource temporarily unavailable".
* Fix waitForExit(duration) code.
Fix test exit code.
* Fix Windows missing SIGTERM.
* Fix mistype.
* Fix compilation error.
* Attempt to fix Nim 1.6 issue.
* Eliminate Nim's WideCString usage to avoid any problems in future.
* Deprecate posix usage in osnet.
* Eliminate unused imports.
* Some debugging statements for investigation.
* Remove all the debugging statements.
* Remove testhelpers in favor of unittest2/asynctests.
* Fix flaky test.
* Make test more resilient to timings.
* Add memory size dump to CI.
* Refactor some blocks to use valueOr.
Make waitForExit to use kill() instead of terminate().
* Remove memory dumps.
* Fix peekProcessExitCode() blocks issue.
* Fix Windows issue.
* Add some debugging echoes.
* Fix compilation error.
* Add some debugging echoes.
* Add more helpers.
* Fix compilation error.
* waitForExit() is primary suspect.
* Remove fast-path for waitForExit.
Remove loop for reading signal events.
* Remove all debugging echoes.
* Return one debugging echo.
* Fix futures tests.
* Add test for multiple processes waiting to attempt stress test.
* Refactor ioselectors_epoll for better signalfd and process monitoring.
Add more race condition fixes to waitForExit.
Fix some Nim 1.6 warnings.
* Fix after rebase issues and warnings.
* Fix style issues.
Fix different Nim versions issues.
Workaround `signalfd` style issues.
* Add one more Linux signals workaround.
Add one more multiple processes test.
* Windows fixes.
* Remove unixPlatform define.
Fix WSAECONNABORTED for devel.
* Temporarily disable rate limit tests.
Fix more devel issues.
* Deprecate `hasThreadSupport` for ioselectors_kqueue.
Fix verifySelectParams issue.
Add exit codes test for multiple processes.
Fix osnet PtrToCstringConv warning.
* ioselectors_kqueue refactoring.
* Initial commit.
* Fix 1.2-1.4 compilation issue.
* Fix unused warning for testCtrlC() test.
* Post-rebase fixes.
* Restore master files.
* More fixes.
* Remove duplicates.
* Fix style mistake.
* Add more flexible pragmas.
* Avoid `FutureContinue` bloat by moving type punning into iterator
(which is typed anyway)
* clear closure iterator from future when iteration is done also on
cancellation / exception
* remove some redundant local variables in `await`
* document `futureContinue` flow
* FutureState.Finished -> FutureState.Completed (to avoid name clash
with `proc finished` which means not-pending)
* deprecate `done` - to avoid additional confusion over completed vs
finished
* remove ad leftovers in stack trace formatting
* avoid some generic bloat
* avoid unnecessary allocations in `race`/`one`
* Initial commit.
* Some Linux fixes.
* Address review comments on Windows.
* Fix issues on Linux.
* Fix 1.2 issue and Windows warnings.
* Fix posix compilation issues.
* Fix cast[pointer] issues on nim-devel.
* More cast[T] fixes.
* Fix compilation error.
* Add oserrno.nim
Further fixes for Windows and Linux.
* MacOS fixes.
* More Windows fixes and attempt to fix 1.2, 1.4 branches.
* Implicitly import/export oserrno.
* Replace oserrno with osdefs.
* Return back oserrno.
* epoll to oserrno.
* datagram/stream to oserrno.
* common to oserrno.
* test to oserrno.
* Add `localAddress` support to `stream.connect`
* fix windows
* TransportAddress() instead of AnyAddress
* tweak flags
* Better flags
* try to workaround nim 1.2 issue
* Handle ReusePort in createStreamServer and improve tests
* Rename ClientFlags to SocketFlags
---------
Co-authored-by: Diego <diego@status.im>
This PR moves all compile-time configuration to a single module,
simplifying documentation and access to these features.
Upcomfing features may be enabled either individually, or through a new
`chronosPreviewV4` catch-all designed to allow code to be prepared for
increased strictness in future chronos releases.
`-d:chronosDebug` may be used to enable the existing debugging helpers
together.
* ioselectors_epoll() refactoring.
* ioselectors_kqueue() refactoring.
* ioselectors_poll() initial refactor.
* Remove `s.count` because it inconsistent and not used in `chronos`.
* Remove Windows version of select() engine.
* Add ability to switch event queue engine via `asyncEventEngine` command line option.
* Make it possible to switch between engines.
* Fix epoll regression.
* Fix poll() engine issues.
* Address review comments.
* Add proper trick.
* Address review comments.
* Bump version to 3.1.0.