473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Queue throughput.

Hi,

I have an application that uses a queue.

I have one thread that populates the queue and a second that takes items off
of the queue and processes them

At the moment all i have is these 2 threads. I may use another thread to
process the items separately so that i now have one thread that puts items on
the queue, another that takes items off the queue and a third that processes
the item.

My question is how do I control the throughput of the queue. What I would
like is the queue to not grow past a certain limit, for arguments sake 100
items.

It is important that items come off the queue and are processed quickly.

Is there a way to control this throughput?

Thanks In Advance
Macca
Feb 7 '06 #1
1 2267
I have built a generic bounded queue for just this use. Consumers will
block on empty Q and Producers will block on full Q.
The project also has a stream Pipe and a Pipe<T> built on the queue with a
sample app for ideas.
http://channel9.msdn.com/ShowPost.aspx?PostID=161030

--
William Stacey [MVP]

"Macca" <Ma***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
| Hi,
|
| I have an application that uses a queue.
|
| I have one thread that populates the queue and a second that takes items
off
| of the queue and processes them
|
| At the moment all i have is these 2 threads. I may use another thread to
| process the items separately so that i now have one thread that puts items
on
| the queue, another that takes items off the queue and a third that
processes
| the item.
|
| My question is how do I control the throughput of the queue. What I would
| like is the queue to not grow past a certain limit, for arguments sake 100
| items.
|
| It is important that items come off the queue and are processed quickly.
|
| Is there a way to control this throughput?
|
| Thanks In Advance
| Macca
Feb 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JP | last post by:
My company is considering acquisition of a packaged application that's based on My SQL. This would be our first use of MySQL and the CEO is worried about using a "no-name" database (he's a...
0
by: Stephan Steiner | last post by:
Hi The project I'm currently working on involves sending large UDP broadcasts. As the .NET framework already provides an easy facility for sending and receiving UDP packets I thought it was a...
2
by: Sumanth | last post by:
How do we increase the throughput between an app server and the DB2 server. I tried increasing the bufferpage size, and get throughput around 5.4 mb/sec. I compute throughput by calculating the...
3
by: Jordi Rico | last post by:
Hi What I want to do is for using with a PDA, but I think it's a VB.NET related question, so I ask it here. It's simple, an user is working with the pda, and from while to while, has to send data...
3
by: Kceiw | last post by:
Dear all, When I use #include "queue.h", I can't link it. The error message follows: Linking... G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x136): In function `main':...
3
by: jrpfinch | last post by:
I have a script which is based on the following code. Unfortunately, it only works on Python 2.3 and not 2.5 because there is no esema or fsema attribute in the 2.5 Queue. I am hunting through...
4
by: j_depp_99 | last post by:
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the...
8
by: Chizl | last post by:
I'm building a web server and having some issues with the TCPListener.Start(BackLog). It doesn't seem to do as expected. I'm using MS Web Stress Tool to test against my web server and when I...
3
by: Kaheru | last post by:
Hi, my IT knowledge not that strong. Hope you guys dun mind I asking a stupid question. I recently been assign with an assignment to performance test a FTP server. I gathered the data using a test...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.