Thread safety



In a previous post, I mentioned using kernel 2.4 because of its handling
of pthreads.  I received some cautionary messages regarding using more
than 1 thread in the user interface.  My hardware simulator project
requires realtime interfacing with a particular parallel interface card,
for which I must create a device driver.  It also has a fairly extensive
user interface, created in Gtk+ with Glade.  I have it in mind that the
device driver will handle reading complete messages from the interface,
storing them in some message area as integer numbers, then set a signal
to the user interface thread to cause the widgets which display recieved
messages to be updated with the received contents.  I also have created
a message building widget group which allows creation of messages, and
uses a Send button to inform the device driver to send the message.  I
suppose that this action will cause a call to the driver to accomplish
the sending.   Could someone please explain the dangers of this
multi-threaded approach?  And, what I must do or could do to remove or
reduce the risks/problems?  It's a work situation, and I _MUST_ make
this work, hopefully in the next few weeks.

Thanks in advance,
Ed





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