this is absolutely a task that can be done async, many applications handle similar "seemingly" blocking synchronous tasks in an asynchronous way
On Jan 10, 2008 8:14 PM, Claude Petit <[EMAIL PROTECTED]> wrote: > I have to wait many responses from an electronic device, and have many > commands to transmit before the command (method) really ends. Yes, I need to > block. > > -----Message d'origine----- > De : Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] la part de Greg Young > Envoyé : Thursday, January 10, 2008 23:03 > À : ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Objet : Re: [ADVANCED-DOTNET] How to know if the current thread is the > UI thread or a worker thread > > > If you are running into this you probably need to re-think how you are > doing things. It would seem to me that you could redo this pretty > simply to be a non-blocking call which would remove this requirement. > A common methodology for doing this would be to use the Async Pattern. > > Cheers, > > Greg > > On Jan 10, 2008 6:50 PM, Claude Petit <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I want to know when to call Application.DoEvents when I'm waiting for > > something. The calling thread can be either the ui thread or a worker > > thread. The ui thread must be able to handle its events, but the worker > > thread can be blocked. Thank you. > > > > Claude Petit > > > > =================================== > > This list is hosted by DevelopMentor(R) http://www.develop.com > > > > View archives and manage your subscription(s) at > http://discuss.develop.com > > > > > > -- > Studying for the Turing test > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > > View archives and manage your subscription(s) at http://discuss.develop.com > -- Studying for the Turing test =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com