Of course, the best solution is not to use use sockets synchronously.

Charles Yeomans

On Apr 18, 2007, at 2:44 PM, Guyren Howe wrote:

> 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.
>

_______________________________________________
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