Tagged Questions
3
votes
3answers
71 views
Threadsafe get method on queue that draws values from other queues?
I have a class that implements Queue and draws values from other queues which may still be referenced outwith it. I want my method to draw values from the contained queues, using synchronized locks on ...
3
votes
0answers
87 views
Concurrent queue
I recently wrote a concurrent, mutex-less (but not lockfree) queue and wanted to know if it is actually correct, and if there are any particular improvements I could make:
...
4
votes
5answers
506 views
Circular queue implementation
Implemented simple thread safe circular queue. Looking for code review, optimizations and best practices.
...
3
votes
2answers
76 views
Thread-safe queue
I need a thread-safe C++ queue. This is what I have in my project, which is mostly based on code I've found on Stack Overflow. How good is it? Can you make it better? Can you suggest better ...
7
votes
1answer
184 views
Lockless Queue Multiple-Reader Singler-Writer in C++
I wrote a lockless queue for sending small objects from a single thread to a random worker thread.
Assumptions:
x86/x86_64 compiled with GCC
one thread may Write(), multiple threads may Read()
...
1
vote
2answers
3k views
Static class ThreadPool implementation
The following code is a self-implementation of the static class ThreadPool in C#, only the QueueUserWorkItem (the simpler ...
5
votes
4answers
2k views
Optimizing a thread safe Java NIO / Serialization / FIFO Queue
I've written a thread safe, persistent FIFO for Serializable items. The reason for reinventing the wheel is that we simply can't afford any third party dependencies ...
3
votes
2answers
1k views
Robust logging solution to file on disk from multiple threads on serverside code
I have implemented a socket listener that runs on my Linux Ubuntu server accepting connections and then starting up a new thread to listen on those connections (classic socket listener approach). ...
1
vote
1answer
4k views
Simple generic multithreaded queue
This is a simple thread safe queue that is used in a producer-consumer model.
...
4
votes
2answers
3k 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 :
...
5
votes
4answers
4k views
3
votes
1answer
3k views
A simple thread-safe queue in python
I'm trying to implement a kind of message queue. Tasks will come in at unknown random times, and must be executed FIFO. I can do multiple tasks in one hit, but the setup and tear down unavoidably ...
2
votes
5answers
1k views
Bounded blocking queue
Can someone please review this code for me. I have not implemented all the methods for simplicity.
Original code:
...
11
votes
6answers
11k 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 ...