queue

Two BlockingQueue in the same endless loop?

I have a thread, that processes incomming messages (endless loop). For this, I use a BlockingQueue (Java), which works as quite nice. Now, I want to add a second processor in the same Class oder method. The problem now is, that in the endless loop i have this part newIncomming = this.incommingProcessing.take(); This part blocks if the...

Advance Queue sample in Oracle

I am looking for an end to end example in Advanced Queueing in Oralce 10G. I am in the process of understanding Adv Queuing i would like to try it out. ...

jQuery .queue() not working as expected

The page in question is right here: http://s289116086.onlinehome.us/lawjournaltv/index.php I'm 90% of the way there, I'm just assuming there's an error with my syntax. Focus on the blue callout area with "Workers' Compensation" as the title: Basically, I've created a little slideshow there with the controls at the top and when you cli...

Dequeue notification table in Oracle

I have implemented below sample. It is working fine. I am planning to integrate with this .net application. As soon i read the entry i would like to dequeue the entry. Can any one tell how i can achive that. http://www.oracle-base.com/articles/10g/dbms_change_notification_10gR2.php Meanwhile i am trying AQ. But it does not have good ...

Simple asynchronous Queue datastructure in C#/mono

I want to write an application that needs a Tasks queue. I should be able to add Tasks into this queue and these tasks can finish asynchronously (and should be removable from this queue, once they are complete) The datastructure should also make it possible to get the information about any task within the Queue, provided a unique queue...

Polymorphic Queue

Hello Everyone, I'm trying to implement a Polymorphic Queue. Here is my trial: QQueue <Request *> requests; while(...) { QString line = QString::fromUtf8(client->readLine()).trimmed(); if(...)){ Request *request=new Request(); request->tcpMessage=line.toUtf8(); ...

Clojure agents consuming from a queue

I'm trying to figure out the best way to use agents to consume items from a Message Queue (Amazon SQS). Right now I have a function (process-queue-item) that grabs an items from the queue, and processes it. I want to process these items concurrently, but I can't wrap my head around how to control the agents. Basically I want to keep a...

Thread safe lockfree mutual ByteArray queue

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 instantiate...

jQuery: Counter, Tricky problem with effects for brainy people.

Hello there! I made this counter that I think is cool because it only makes visible changes to the numbers being changed between each time it is triggered. This is the code // counter $('a').click(function(){ var u = ''; var newStr = ''; $('.counter').each(function(){ var len = $(this).children('span').length; ...

How to convert a C# Queue into a binary datatype to be stored as a SQL Blob?

Hi All, How do I convert a C# Queue into a binary variable, so that I can store it as a blob in SQL? Help appreciated! Soham ...

Java performance problem with LinkedBlockingQueue

Hello, this is my first post on stackoverflow... I hope someone can help me I have a big performance regression with Java 6 LinkedBlockingQueue. In the first thread i generate some objects which i push in to the queue In the second thread i pull these objects out. The performance regression occurs when the take() method of the Linked...

Using the Queue class in Python 2.6

Let's assume I'm stuck using Python 2.6, and can't upgrade (even if that would help). I've written a program that uses the Queue class. My producer is a simple directory listing. My consumer threads pull a file from the queue, and do stuff with it. If the file has already been processed, I skip it. The processed list is generated bef...

Does sending a dictionary through a multiprocessing.queue mutate it somehow?

I have a setup where I send a dictionary through a multiprocessing.queue and do some stuff with it. I was getting an odd "dictionary size changed while iterating over it" error when I wasn't changing anything in the dictionary. Here's the traceback, although it's not terribly helpful: Traceback (most recent call last): File "/usr/li...

How to build a Terabyte queue ?

How to build/design/program a Terabyte or Petabyte queue in memory? (Imagine a twitter like service with huge number of users.) ...

Which Queue implementation to use in Java?

I need to use a FIFO structure in my application. It needs to have at most 5 elements. I'd like to have something easy to use (I don't care for concurrency) that implements the Collection interface. I've tried the LinkedList, that seems to come from Queue, but it doesn't seem to allow me to set it's maximum capacity. It feels as if I ju...

Issue with dynamic array Queue data structure with void pointer

Hi, Maybe there's no way to solve this the way I'd like it but I don't know everything so I better ask... I've implemented a simple Queue with a dynamic array so the user can initialize with whatever number of items it wants. I'm also trying to use a void pointer as to allow any data type, but that's the problem. Here's my code: type...

Implementing an Online Waiting Room

My organization is building a new version of our ticketing site and is looking for the best way to build an online waiting room when the number of users in our purchase path exceeds a certain limit. The best version of this queue would let new users in after existing users have either completed their purchase or have exceeded a timeout ...

Testing a Non-blocking Queue

I've ported the non-blocking queue psuedocode here to C#. The code below is meant as a near verbatim copy of the paper. What approach would you take to test the implementation? Note: I'm running in VS2010 so I don't have CHESS support yet. Edit: I've removed the code in question so some unsuspecting developer doesn't use it -- it req...

create a queue of process in classic asp

Hi, here is the problem : there is classic asp app which is calling lame.exe for encoding mp3s for lots of time per day and there is no control of the way of calling lame.exe from several users in another word there is no queue for that purpose. so here is what I am thinking about : //below code all are pseudo-code //process_flag and m...

c++ queue template

ALright, pardon my messy code please. Below is my queue class. #include <iostream> using namespace std; #ifndef QUEUE #define QUEUE /*---------------------------------------------------------------------------- Student Class # Methods # Student() // default constructor Student(string, int) // constructor display() ...