BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error, timer event handler

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
Pablo Mena
Guest





PostPosted: Wed Jan 05, 2005 12:38 pm    Post subject: Error, timer event handler Reply with quote



Product: Borland C++ Builder 6.0 Professional

Problem:

Having 2 or more timer event handler, if one of them locks waiting for a
response, the whole program blocks.

Is it possible to block just the event handler waiting for the answer and
remain the other working properly?

Pablo Mena


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Jan 05, 2005 5:47 pm    Post subject: Re: Error, timer event handler Reply with quote




"Pablo Mena" <pmena (AT) success (DOT) cl> wrote


Quote:
Having 2 or more timer event handler, if one of them locks
waiting for a response, the whole program blocks.

As well it should. TTimer uses window messages (WM_TIMER in particular).
The OnTimer event is triggered from within a message handler. While your
handler is running, no other messages are being processed, unless you pump
the message queue manually via Application->ProcessMessages().

Quote:
Is it possible to block just the event handler waiting for the answer
and remain the other working properly?

No. I would suggest that you not use timers to begin with. Use threads
instead.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.