Current implementation of ParallelForwardingAppender is wrong, since it block a thread form the default ThreadPool. The C# Tasks and Threads should not be mixed together. {{BlockingCollection}} is based on a thread synchronization (lock), so do not use it for the Task running on a ThreadPool.
The Task based producer - consumer is a bit more complicated, e.g. see Stephen Clearys's or .NET doc). Anyway, do not use tasks, since the ForwardLoggingEvent is not Task-based. (E.g. some appender sending logs by network may have long log times.) Just start a new plain thread.
Current implementation of
ParallelForwardingAppender
is wrong, since it block a thread form the default ThreadPool. The C# Tasks and Threads should not be mixed together. {{BlockingCollection}} is based on a thread synchronization (lock), so do not use it for the Task running on a ThreadPool.The Task based producer - consumer is a bit more complicated, e.g. see Stephen Clearys's or .NET doc). Anyway, do not use tasks, since the
ForwardLoggingEvent
is not Task-based. (E.g. some appender sending logs by network may have long log times.) Just start a new plain thread.See also #37