Thread safe lockfree mutual ByteArray queue
Posted
by user313421
on Stack Overflow
See other posts from Stack Overflow
or by user313421
Published on 2010-04-10T11:26:43Z
Indexed on
2010/04/10
11:33 UTC
Read the original article
Hit count: 352
A byte stream should be transferred and there is one producer thread and a consumer one. Speed of producer is higher than consumer most of the time, and I need enough buffered data for QoS of my application. I read about my problem and there are solutions like shared buffer, PipeStream .NET class ... This class is going to be instantiated many times on server so I need and optimized solution. Is it good idea to use a Queue of ByteArray ?
If yes, I'll use an optimization algorithm to guess the Queue size and each ByteArray capacity and theoretically it fits my case.
If no, I what's the best approach ?
Please let me know if there's a good lock free thread safe implementation of ByteArray Queue in C# or VB.
Thanks in advance
© Stack Overflow or respective owner