Tagged Questions
7
votes
5answers
2k views
Circular Bounded Que using C#
I have implemented a circular bounded que using arrays as the base data structure. I'd appreciate if someone can review it for me.
class BoundedQueue<T> {
T[] que;
int head; ...
6
votes
1answer
272 views
A queue that switches from FIFO mode to priority mode
I implemented a queue capable of operating both in the FIFO mode and in the priority mode: when the priority mode is enabled, the elements are taken in order of decreasing priority; when the priority ...
1
vote
1answer
1k views
Simple generic multithreaded queue
This is a simple thread safe queue that is used in a producer-consumer model.
public class ThreadedQueue<TType>
{
private Queue<TType> _queue;
private object _queueLock;
...
4
votes
2answers
2k views
Did I need to use lock to ensure that Queue.Dequeue is Thread Safe in this case on .NET 2.0?
Is this ok? I am using C# and .NET 2.0
I have this Queue declared in my class :
static private Queue<SignerDocument> QUEUE = new Queue<SignerDocument>();
I fill this Queue with some ...
10
votes
7answers
8k views
A custom thread-pool/queue class.
I wanted a class which executes any number of tasks but only a certain amount at the same time (e.g. to download various internet content and keep the overall download speed at a good level). The ...
0
votes
1answer
251 views
Queue Dequeue/TryeDequeue PulseAll does not occur,
This is the very first message on CodeReview. To simplify my own process to get helped, i was sum all of my problem onto this GIST; https://gist.github.com/1057263
I hope this is ok. If anyone wants ...
5
votes
1answer
929 views
Refactoring a multi-threaded producer-consumer model
This is an architecture question for a multi-threaded program which is going to be moved from C# .NET 2 to .NET 4. The program currently has multiple processing threads, and one database I/O thread. ...