Instead of asyncWork, now uses a worker task directly and signals the finalization of the result using message passing. This avoids the roundtrip required to return the task handle, as well as the heap allocated result buffer of Future!T.
Instead of starting at zero, start at the current file size. This offset
is stored in FileStream. It is only an approximation because concurrent
writes could advance the file without FileStream's knowledge.
Add a test that shows that the offset is approximated as expected and that
appending to an existing file works, too.
This is also a regression test which shows that appending to an existing
file works as expected. See vibe-d/eventcore#115.
This change ensures that a return value of false guarantees the next call to consumeOne to succeed, meaning that the combination of empty/consumeOne is sound in a single-consumer scenario. This also updates the documentation to stress that tryConsumeOne is still the preferred API.
Makes sure that the task finalization finishes (including notifying possibly multiple joiners) before the fiber yields, because it won't be resumed by the scheduler before the next task gets assigned to the fiber.
- Task.join and Task.interrupt are now thread-safe
- TaskFiber.task returns Task.init if no task is running (avoids bogus resumes of the TaskFiber by the scheduler)
To enable thread-safe join/interrupt, the task counter is now stored together with the necessary flags within a single shared ulong that is manipulated atomically.
Allows to disconnect all connections that are not currently in use. In particular, it allows to close all connections at shutdown to avoid leaking socket descriptors.
Avoids listDirectory/iterateDirectory getting interrupted when stumbling over inaccessible files. The `name` field of the returned file info value is always set, so that these files can still be identified.
`runApplication` takes an `args_out` parameter which, if non-null, is
supposed to be set to match unrecognized command-line args. However,
the parameter is never passed to `finalizeCommandLineOptions`, which
will therefore log an error and throw an exception if any command line
arguments are unrecognized.
This patch fixes the oversight, ensuring that `runApplication` will
correctly populate a non-null `args_out` parameter with unrecognized
command-line arguments, and not throw an exception in this case.