e769a9b1ca
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++)). |
||
---|---|---|
.. | ||
args.d | ||
concurrency.d | ||
connectionpool.d | ||
core.d | ||
file.d | ||
log.d | ||
net.d | ||
path.d | ||
stream.d | ||
sync.d | ||
task.d | ||
taskpool.d |