Re: How to create a dialog window from a thread?



On 15 Nov 2000, at 22:25, G Hasse wrote:

Why use a thread?
Have you tried to use?

  gdk_input_add( fd, GDK_INPUT_READ, GTK_SIGNAL_FUNC(file_function),
                 &cmdinfo );

When there is data on the fd "file_function" will be called. This
could work if you don't get to much data.

I'm writing the app in M$ Windows, so I'm unable to just read from 
a file descriptor :-(

All io is done as asynchronus io thru the win32api. The win32api 
calls have been put in a seperate c++ class.

What kind of data comes over the port? Lots or little?

I'm doing transfers at 9.6 Kbit/s. First I tried to read/write the UART 
directly, but got loads of buffer overruns. That is why i'm doing it 
thru the winapi (which is properly the right way to do it, i guess).

Lots of data arrives in a short time, then nothing for a long time, 
then lots of data in a short time, etc.

The app is software for remote controlling a PLC (see: 
http://www.plcs.net)


Michael Loft




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]