Hi,
I'm trying to make a queue be listened by two different applications but, so far, I didn't succeed on that.
I have tried both BeginPeek and BeginReceive methods but none of them worked. If I use BeginReceive along with ReceiveCompleted event only one server receives the message. If I use BeginPeek along with PeekCompleted the syste...
I need to implement a producer/consumer bounded queue, multiple consumers against a single producer.
I have a push function that adds an item to the queue and then checks for maxsize. If we have reached it return false, in every other case return true.
In the following code _vector is a List<T>, onSignal basically consumes an item in a...
I want to use a database table as a queue. I want to insert in it and take elements from it in the inserted order (FIFO). My main consideration is performance because I have thousands of these transactions each second. So I want to use a SQL query that gives me the first element without searching the whole table. I do not remove a row wh...
Hi Everyone, I have found a number of answers for the same question in a DIFFERENT context. I'm looking to add '.stop' to the following code to prevent animation queue buildup:
//Top Mailing List Drop down animation
$(document).ready(function() {
$('#top_mailing_hidden').hide();
jQuery('#top_mailing')
.bind("mouseenter",functio...
Hi, I'm new to Java and really need your help.
I am presently using a queue, a receiver thread puts data into this queue and the parser reads out of this.
But the problem is the receiver may receive at incredible peak speed, eg. 3000/sec, while the parser only parses at 100/sec.
EDIT:I have checked, the queue first
stays at 100 o...
I have some code which creates a synchronised queue which I use in a data gathering class to report it's data. The method which creates queues is kicking up a warning:
Queue^% DataGatherer::AddOutputQueue()
{
Queue^ outputQueue = Queue::Synchronized(gcnew Queue);
AddOutputQueue(outputQueue);
return outputQueue;
}
1>.\Da...
According to the Sun's documentation on ServerSocket:
The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.
How can I increase the the queue length? It's my server's bottle-neck.
Thank you.
...
The Queue implementation in java has two methods to remove element, One is remove() which throws exception and other one is poll() which returns null for an empty queue. I have two doubts:-
Why Queue has diff implementation to remove element?
Which implementation to use When?
Munish
...
Good evening, people!
I'm trying to solve a rather simple problem, but.. well, it seems that I can't. :)
The idea is that I have a FIFO list (FIFO queue) with n elements and it's given a value, k (k < n). My little program has to move the elements to the left with k elements. (e.g. for n=4, k=3, a[]=(1, 2, 3, 4), the result is 4 1 2 3)...
Hello,
I am helping my son with a college programming class, and I guess I need the class too. He has completed the assignment, but I don't believe he is doing it the best way. Unfortunately I can't get it to work with my better way. It's clearly better, because it doesn't work yet.
He is being asked to implement some methods for a ...
Hey guys,
I'm looking to implement RabbitMQ into my PHP application, and am using the php-amqp extension. My only question is this, how do I easily query to return the contents of the queue in PHP?
php-amqp seems to not enable me to do this. If I am going wrong, please help me out here :)
...
I've done some easy .hover(function() statement in jQuery. When i hover over a text i simply want a #div.fadeIn, and on non-hover fadeOut. It works. But it's just if i spam the text-trigger with hover and un-hoverring really quickly and then stop the animation begin to give a blinking effect. It just kind of loops, really annoying!
...
here is what i have so far. the problem i am faceing is how do i find the number of elemets in the file so i can initialze the queue. Your suggestions will b most appritated.
class FileHandler {
BufferedReader data;
DataInputStream in;
public FileHandler(String fileName) {
try {
data = new BufferedReader(new FileReader(...
I wondered if it's possible to use a queue (specifically as ConcurrentQueue) as the source of an IObservable? Something like;
Queue = new ConcurrentQueue<IMessage>();
var xs = Queue.AsEnumerable().ToObservable();
xs.Subscribe((IMessage msg) =>
{
Console.WriteLine("Msg :" + msg.subject);
});
I guess it doesn't ...
correction it works now thanks everyone.
Okay so now I have updated my main file to
main.c
#include "queue.h"
int main(){
int i;
int* dataPtr;
int number;
QUEUE* numbers;
numbers = createQueue ();
printf("Please enter the 10 numbers you want to know the sum and average of.\n");
for (i = 0; i < 10; i++){
...
Okay I have the queue program that I have been working on and I finally figured most of it out. The problem I am having now is that everytime I enter numbers into the keyboard and then access them I get the same number. if I enter 5 ones when it goes to add them together it says the answer is 37 which is not right. here is my code again:...
Why, oh why doesn't java.util.concurrent provide a queue length indicators for its ExecutorServices? Recently I found myself doing something like this:
ExecutorService queue = Executors.newSingleThreadExecutor();
AtomicInteger queueLength = new AtomicInteger();
...
public void addTaskToQueue(Runnable runnable) {
if (queueLength.ge...
Dear all,
I am new to JMS API , I want to try QueueSender in multi-thread environment....
So, the question ..
Is QueueSender.send() thread safe ?please provide reference or demo if available
thanks in advance,,,,
...
I will listen on a port (simple server) when a request is passed parse the URL
and start a thread.
The thread will insert an element in a queue which is shared, and it is locked while inserting.
I am not able to get element when I call peek on queue.
use Thread qw(async);
use Thread::Queue;
my $DataQueue:shared = new Thread::Queue;...
Is putting an object in a multi-processing queue independent from getting an object from it?
In other words, will putting an object block the process P1 if another process P2 is getting from it?
Update: I am assuming an infinite queue.
...