Many places around were re-inventing logException with varying level of success.
In addition, the full error is now printed as a diagnostic instead of debug.
This is more in line with the description of `LogLevel.diagnostic`
("Extended user information (e.g. for more detailed error information)"),
as opposed to the one of `LogLevel.debug_`
("Developer information useful for algorithm debugging").
Since DMD v2.079.0 it is possible to put default, always-used default parameters
after variadic arguments (as long as IFTI is used).
This way we can move all the compile-time arguments, which would always trigger
a template instantiation, to runtime arguments, and re-enable module and function.
This was not working at all since the release of vibe-core due to dependencies on other parts of vibe.d. The unit test has now been moved out of the template class, so that it is actually run.
The deadlock happened because a function that waits for a worker task to finish was passed to the log functions. Evaluated lazily, it got called while the logger's mutex was locked, meaning that any log call from within that thread would cause a deadlock.
This change also has another, possibly important, implication - arguments are evaluated only once instead of possibly multiple times if multiple loggers are registered. This could very well make a lot of existing (wrong) code more robust (e.g. logInfo("%s", i++)).
- Moves a lot of stuff from vibe.core.core to vibe.core.task
- Introduces TaskScheduler to unify the scheduling process
- Refines how tasks are scheduled and processed (can push to the front of the task queue and uses a marker task to keep track of the spot up to which to process)
- Start to add proper support for task interrupts and timeouts by properly cancelling in-flight async operations
- Work on ManualEvent - still not functional for the shared case
- Implement proper IP address parsing in NetworkAddress
- it might make sense to have newlines in a log message
(e.g. when printing a backtrace) and they shouldn't
be split into multiple log messages, e.g. when using syslog
- the splitting was fixed to work with more than one LF
(cherry picked from commit d14ce3dea1b98227dcd116acc6b175c56d9a1fb0)
The library is able to support simple TCP servers in the current state. The API is still mostly compatible with mainline vibe.d, but the driver systen has been replaced by the eventcore library and sockets/files/timers/... are now structs with automatic reference counting instead of GC collected classes. The stream interfaces have been removed for now.