On Apr 18, 2007, at 11:04 AM, Charles Yeomans wrote:

> I think that this may be one of the few situations in which you can
> use App.DoEvents in a GUI application.
>
> do until respArrived
>    mySocket.Poll
>    app.DoEvents
> loop
>
> Charles Yeomans

Why not instead do:

     While Not respArrived
       App.SleepCurrentThread 50
     Wend

There is a bug where this screws up thread debugging. But if you're  
not using threads, this works great. If you *are* using threads, I  
suggest switching to Charles' suggestion or just going into a busy  
wait loop, when running out of the debugger.

> On Apr 18, 2007, at 4:41 AM, Guillermo wrote:
>
>> I have the same problem using socket.poll,  the loop consumes a  
>> lot of
>> CPU cycles while waiting for the answer:
>>
>> ....
>> while not respArrived
>>      mySocket.poll
>> wend
>>
>> I'm searching for a method that the program don't consume CPU  
>> while is
>> waiting for the answer.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to