queue

Preventing ConcurrentLinkedQueue<T> from outofmemory Exception

When working with ConcurrentLinkedQueue, how can I limit the size of the Queue. Is it possible that it will through outofmemory exception ? ...

What's compared in my Class without an EqualityComparer?

I want to check if an object is in a Queue before I enqueue it. If don't explicitly define an EqualityComparer, what does the Contains() function compare? If it compares property values, that's perfect. If it compares to see if a reference to that object exists in the Queue then that defeats the purpose. ...

Is instantiating a Queue using {a,b,c} possible in C#?

Is it possible to do that in C#? Queue<string> helperStrings = {"right", "left", "up", "down"}; or do I have to produce an array first for that? ...

confused about python subprocess inside for loop

I am trying to automate some big data file processing using python. A lop of the processing is chained , i.e script1 writes a file , that is then processed by script2 , then script2's output by script3 etc. I am using the subprocess module in a threaded context. I have one class that creates tuples of chained scripts ("scr1.sh","scr2...

Asynchronous architecture : Error handling

Hi , what is the most elegant way to handle errors in an Asynchronous arch. assuming I have the following workflow : I have a web application that creates new files (bussines configuration files) from that point the following steps are copying the new files to a network shared file system . dispatching refresh commands to several app...

temporary queues for msmq

In the JMS world there is this concept called temporary destinations which is very heplful for request/response scenarios. The sender makes request on some destination and creates a temporary destination (which exists only as long as the session it is created in is stil there)for receving the responses. Is there such a thing for msmq? ...

How to async add elements to Queue<T> in C#?

public void EnqueueTask(int[] task) { lock (_locker) { _taskQ.Enqueue(task); Monitor.PulseAll(_locker); } } So, here I'm adding elements to my queue and than threads do some work with them.How can I add items to my queue asynchronously? ...

options for queuing and processing transactions in Microsoft Windows?

I'm working in the microsoft world and needing to create a transaction processing webservice. The webservice will receive a transaction and submit it to a queue. A second service will pull the transactions out of the queue and process them. I have been considering two different approaches: database table (roll my own queue) and micr...

How to queue tasks on a worker thread in Android?

Hi, I'm trying to find some simple way of queueing tasks on a thread that is NOT the UI-thread. I have a BroadcastReceiver that responds to Intents each time an image is taken, and notifies my Service each time that happens. The Service will have to do some processing (scaling and rotating an image) and I would like to do this on a new ...