View previous topic :: View next topic |
Author |
Message |
qt
Joined: 23 Aug 2005 Posts: 46 Location: Berlin, Germany
|
Posted: Tue Sep 16, 2008 10:48 pm Post subject: winio@ in separate threads? |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Wed Sep 17, 2008 7:31 am Post subject: |
|
|
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 |
|
Back to top |
|
|
|