Silverfrost Forums

Welcome to our forums

winio@ in separate threads?

16 Sep 2008 9:48 #3826

Dear Paul,

due to a customer a request I have to come back to the 'thread safe' theme. I read here that 'winio@ processes the Windows message queue on a single thread.' Now, what if I start two threads (using WinAPI CreateThread) and each one is using winio@ calls. According to the customer's experience this seems not to be possible. What is to be done to have winio@ run in separate threads?

Thank you for your efforts.

Kind regards, Jörg Kuthe www.qtsoftware.de

17 Sep 2008 6:31 #3828

Jörg

As far as I know there is no way to make this work. I have tried to do something similar when using the .NET framework and although in theory it is possible to access the Windows GUI library from different threads (in that context). I practice I have found it easier to write the code in such a way that only one thread does the communication.

Since it is difficult when using .NET, I think that I am safe in saying that it is not possible when using ClearWin+ which is really just a wrapper for the Windows GUI API.

My suggestion is that the user tries to find a way to transmit information from one thread to the other and to use only one thread to communicate via ClearWin+. However, it might be possible to use simple MessageBox calls on one thread and winio@ on the other.

Paul

Please login to reply.