Tag: C#

Best way in .NET to manage queue of tasks on a separate (single) thread

http://stackoverflow.com/questions/20056727/need-to-understand-the-usage-of-semaphoreslim http://stackoverflow.com/questions/20904328/c-sharp-async-tasks-in-a-queue-or-waiting-list http://stackoverflow.com/questions/25691679/best-way-in-net-to-manage-queue-of-tasks-on-a-separate-single-thread To create an asynchronous single degree of parallelism queue of work you can simply create a SemaphoreSlim, initialized to one, and then have the enqueing method await…

C# does Go, pipelines

Source: https://blog.marcgravell.com/2018/07/pipe-dreams-part-1.html decoupled and overlapped reader/writer access to a binary stream buffer management (pooling, recycling) threading awareness rich backlog control over-fill protection via back-pressure the data is more simply a…

Why Delegates

https://www.velir.com/blog/2011/07/14/how-improve-code-reusability-using-c-delegates http://www.codeproject.com/KB/cs/delegatespart1.aspx http://www.codeproject.com/KB/cs/delegatespart2 http://www.codeproject.com/KB/cs/delegatespart3 http://www.codeproject.com/KB/cs/delegatespart4 http://www.codeproject.com/KB/cs/delegatespart5