adams85 / filelogger

A lightweight yet feature-rich file logger implementation for the Microsoft.Extensions.Logging framework.
MIT License
147 stars 22 forks source link

Replace System.Threading.Task.Dataflow with System.Threading.Channels #5

Closed TechInterMezzo closed 4 years ago

TechInterMezzo commented 4 years ago

This is more lika a suggestion. Maybe this library could benefit from channels.

Here is a blog post I find quite easy to understand: https://ndportmann.com/system-threading-channels/

Channels seem to be a more recent development than the dataflow library. They have a clean API and seem to focus on solving the problem of fast and thread safe queues.

adams85 commented 4 years ago

Thanks for the tip! Dataflow may be a bit heavy-weight for the use case of this lib indeed. Furthermore, chances are that overall performance would benefit from Channels as well. It's definitely worth giving it a go.