Hi all,
I have the following problem and cannot find a good solution, perhaps
anyone of you has an idea:
My TopSpeed 3.10 program needs three independent threads, two of them
need input form the keyboard/mouse, the third thread does not.
Therefore I have implemented a fourth thread, which is looking for
keyboard/mouse events and stores the events in a queue. If an event is
available the process sends a signal sEventAvailable. The two threads
needing input are calling the procedure
PROCEDURE GetEvent (VAR Event : EVENT);
BEGIN
WAIT (sEventAvailable);
Event := PopEvent ();
END GetEvent;
This works very well, if only one process is waiting for input, but it
will obviously not work, with two or more processes, because it is not
clear, whether the event belongs to the calling process or not. Any
ideas to solve this problem in an easy way?
MfG / Regards
Peter Engels
--
This OS/2 system uptime is 00 hours, 56 minutes and 33 seconds.
Please use the reply-to address for e-mails!


|