producer-consumer
Single Producer and Consumer example in Thinking In Java 4
In TIJ4 P1208, there is one consumer (WaitPerson) and one producer (Chef). Each synchronize on itself when checking if there is meal available. I think they should synchronize on the meal instead. Oth[详细]
2023-01-23 14:03 分类:问答Multithreading: classical Producer Consumer algorithm
Something I don\'t get about the classical algorithm for the Producer-Consumer problem (from Wikipedia:)[详细]
2023-01-22 11:01 分类:问答Producer-Consumer model - binary semaphore or mutex?
This is mainly about the understanding of the concept, which confuses me. Mutex means that one thread takes the control of the access of shared resource, performs operations and unlocks it, then only[详细]
2023-01-22 00:16 分类:问答Variable scope in multithreading, why my object reference is lost?
Briefly under a single producer - single consumer scenario, I used a mutable object for synchronization and passing data and messages between producer and consumer. Shared buffer is a ConcurrentQueue[详细]
2023-01-21 03:29 分类:问答Boost condition deadlock using wait() in producer-consumer code
I have implemented a basic threaded producer-consumer (thread 1 = producer, thread 2 = consumer) using Boost threads and conditions. I am getting stuck in wait() indefinitely quite often. I can\'t rea[详细]
2023-01-20 01:58 分类:问答very unique exception for BlockingCollection on .net 4.0
i\'m using the BlockingCollection for a Producer Consumer pattern and i got an excecption i think to write a patent on it- only two results in google![详细]
2023-01-19 21:16 分类:问答Producer Consumer queue does not dispose
i have built a Producer Consumer queue wrapping a ConcurrentQueue of .net 4.0 with SlimManualResetEvent signaling between the producing (Enqueue) and the consuming (while(true) thread based.[详细]
2023-01-19 16:44 分类:问答ActiveMQ: Slow processing consumers
Concerning ActiveMQ: I have a scenario where I have one producer which sends small (around 10KB) files to the consumers. Although the files are small, the consumers need around 10 seconds to analyze t[详细]
2023-01-17 17:46 分类:问答Irregular Transmission Problem with Python Twisted Push Producer
I want to transmit data from a Queue using Twisted. I currently use a push producer to poll the queue for items and write to the transport.[详细]
2023-01-17 04:29 分类:问答possible memory leak in a singleton?
I\'ve asked this question before with no real answer. Can anybody help? I\'m profiling the below code inside a singleton and found that a lot of Rate objects (List<Rate>) are kept in memory alth[详细]
2023-01-16 04:28 分类:问答