Click here to Skip to main content
13,291,084 members (66,784 online)
Click here to Skip to main content
Add your own
alternative version


32 bookmarked
Posted 15 Jun 2001

Circular Buffer

, 15 Jun 2001
Rate this:
Please Sign up or sign in to vote.
A multi-threaded circular buffer program

Sample Image - circbuf.gif


I recently needed a class that performed both a read and write operation to a queue. I started searching for such a class, and I found one here at Code Project. I made several changes to the application. First, I converted the program from console application to an MFC SDI application using a CListView for displaying the data (see screenshot). Next, I simplified the thread synchronization process by sending a user defined window message. And finally, I added a performance timer (also found here at Code Project) which measures the time required to execute the program using different queue sizes. For specific details on how the queue portion of the program works reference David Hubbard's Circular Buffer article. I have included a small demonstration application in a project called Circbuf. It is multithreaded MFC SDI application using VC6.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Jacques Cooper
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

Generalincrease the queue size ,then not work queSz = 500; Pin
Jimmy Zhao24-Jul-04 17:52
memberJimmy Zhao24-Jul-04 17:52 
I try to increase the queue size from 50 to 500, but it doesn't work.


General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171207.1 | Last Updated 16 Jun 2001
Article Copyright 2001 by Jacques Cooper
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid