Re: [Dev-C++] how to update data constantly?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Jessica C. <jes...@gm...> - 2007-12-06 17:08:27
|
Thanks so much, Rafael. I think I understand your method to solve the problem what I met. And I believe this method can help me solve the problem. But it is a little bit difficult. I mean, for the whole code structure, you need one more thread to trigger my GUI code. Then the whole structure of the project is not that reasonable. :-) Your idea is based on "Singal Triggered". It belongs to the design of CPU-bound system. (As my understanding, CPU-bound system triggers events by signals.) But unfortunately, it seems Win32 API GUI design is I/O bound system. (As my understanding, I/O bound system triggers events by I/O input, like buttons.) Your consideration is still great and classic, specially when using CPU-bound system. Now I am using Chris' way to solve my problem. "A commonly used technique is to have the GUI thread check the reader thread every X miliseconds." BTW, I am new in the area of Win32 API programming. Anything wrong/unclear, pls let me know. On Dec 6, 2007 11:44 AM, Chris Miller <lor...@gm...> wrote: > On Dec 6, 2007 8:41 AM, Jessica Chen <jes...@gm...> wrote: > > Thanks, Chris. > > > > Your way of "A commonly used technique is to have the GUI thread check > the > > reader > > thread every X miliseconds." works fine in my project. > > Hey, worked fine in Java, why can't it work in C++? > > Glad it worked! > > -- > Registered Linux Addict #431495 > http://profile.xfire.com/mrstalinman > John 3:16! > If Microsoft is the Wal*Mart of the Software World, then Linux is the Home > Depot > |