forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

winio@ in separate threads?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
qt



Joined: 23 Aug 2005
Posts: 46
Location: Berlin, Germany

PostPosted: Tue Sep 16, 2008 10:48 pm    Post subject: winio@ in separate threads? Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Wed Sep 17, 2008 7:31 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group