Hi,
I was wondering if the fifo queue presented in Fober et al's paper http://nedko.arnaudov.name/soft/L17_Fober.pdf was a multiple consumer and produce fifo queue. If not, which is the best documented multiple consumer and producer FIFO queue?
Thanks
...
I have a consumer thread taking elements from a LinkedBlockingQueue, and I make it sleep manually when it's empty. I use peek() to see if the queue empty because I have to do stuff before sending the thread to sleep, and I do that with queue.wait().
So, when I'm in another thread and add()an element to the queue, does that automatical...
I'm reading C# 4.0 in a Nutshell by the Albahari brothers and I came across this:
Stacks are implemented internally with an array that's resized as required, as with Queue and List. (pg 288, paragraph 4)
I can't help but wonder why. LinkedList provides O(1) head and tail inserts and deletes (which should work well for a stack or qu...
I have two tables in my database, one for In and one for Out. They have two columns, Quantity and Price. How can I write a SQL-query that selects the correct price?
In example: If I have 3 items in for 75 and then 3 items in for 80. Then I have two out for 75, and the third out should be for 75 (X) and the fourth out should be for 80 (Y...
We have a table called worktable which has some columns(key (primary key), ptime, aname, status, content).
We have something called producer which puts in rows in this table and we have consumer which does an order-by on the key column and fetches the first row which has status 'pending'. The consumer does some processing on this row:
...
There are a list of tasks that are time sensitive (but "time" in this case is arbitrary to what another program tells me - it's more like "ticks" rather than time). However, I do NOT want said methods to evaluate immediately. I want one to execute after the other finished. I'm using a linked list for my queue, but I'm not really sure how...
I was thinking, is it possible to have a lockless queue when more then one thread is reading or writing? I seen an implementation with a lockless queue that worked with one read and one write thread but never more then one for either. Is it possible? I don't think it is. Can/does anyone want to prove it?
...
What is the purpose of Task Queue Java API? How does it work, and where should it be used?
...
Possible Duplicate:
Task Queue Java API
Hi Its difficult for me to understand the Task queue java API concept Plz give me a simple complete Task queue program It will very useful to understand the concepts... Plz Help me..
Regards
Sharun.
...
Hi i'm new to Task queue concepts when i referred the guide I got struck on this line
queue.add(
DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
TaskOptions().url("/path/to/my/worker"));
what is TaskOptions() method. Is it default method are method created manually what will TaskOptions() method wil...
Hi i'm new to Task queue java API i tried a simple Example for it. My idea is to redirect the queue file to a servlet and to print some statement in the servlet.But it doesn't work. i mapped web.xml and used default queue I didnt get any Error but the file is not redirected to servlet . this is the codee i followed
taskq.java
...
Hi when i started to work on Task queue concept i got struck on this line
queue.add(
DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
TaskOptions().url("/path/to/my/worker"));
What will DatastoreServiceFactory do... How to redirect this page to another servlet.... in the url i gave
.url("/myservlet"...
I find I sometimes need to iterate some collection and make an ajax call for each element. I want each call to return before moving to the next element so that I don't blast the server with requests - which often leads to other issues. And I don't want to set async to false and freeze the browser.
Usually this involves setting up some k...
Fellow StackOverflowers, is there a way for me to remove a queue or a topic in ActiveMQ programatically? I am using ActiveMQ's standard persistency, and my application requires that, on startup, all new queues be dynamically re-created (unless there are messages stored in the queue, in which case, the queue should remain to exist).
I am...
Hi there,
I have a generic check that needs to be run on ca. 1000 objects. The check takes about 3 seconds. We have a server with 4 processors (and we also have other multi-processor servers in our network) so we would like to create an exe / dll to do the checking and return the results to the "master".
Does anyone know of a framework...
Hi,
I'm trying to figure out how to make 4 images fade in sequentially when the page loads.
The following is my (amateurish) code:
Here is the HTML:
<div id="outercorners">
<img id="corner1" src="images/corner1.gif" width="6" height="6" alt=""/>
<img id="corner2" src="images/corner2.gif" width="6" height="6" alt=""/>
<img id="co...
Hi,
I have a program with several worker threads, and a main thread that receives jobs. In the main thread I want to queue the jobs onto a synchronized queue, and have the worker threads sitting there all waiting on the queue. When there's something in the queue I want the worker to pull the job from the queue, while the remaining work ...
$(".item").each(function(){
var item_link = $(this).find("a").attr("href");
$(this).prepend('<div class="img_url"></div>');
var img_url = $('div.img_url', this);
$.get(item_link, function(data) {
var src = $('.poster img', data).attr('src');
img_url.html(src);
});
});
Each .get should be started afte...
Hi,
I'm working on some application and using ThreadPoolExecutor for handling various tasks. ThreadPoolExecutor is getting stuck after some duration. To simulate this in a simpler environment, I've written a simple code where I'm able to simulate the issue.
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Rej...
Hi,
I am getting the following error while connecting ear phones to the device (iPhone)
"Audio queue get Current time failed" while playing live audio stream.
After connecting the ear phones, I get an alert saying the error.
any idea how to rectify this issue.
...