As I suggested before, this is something for which you can use  
App.DoEvents.  This is how the framework classes implement  
synchronous socket methods, as the documentation to which I pointed  
you to explains.


Charles Yeomans


On Apr 19, 2007, at 6:19 AM, Guillermo wrote:

> I have no problem disabling the interface while I wait for the result,
> the problem is how not eat a lot CPU cycles doing nothing in the
> waiting loop.
>
>      Guillermo
>
>
> 2007/4/19, Marc (aliacta.com) <[EMAIL PROTECTED]>:
>> I guess the ultimate workaround is simply to disable the whole
>> interface, windows and menus, while you wait for the result...
>>
>> Marc
>>
>> On Apr 19, 2007, at 10:33 AM, Guillermo wrote:
>>
>>> 2007/4/19, Marc (aliacta.com) <[EMAIL PROTECTED]>:
>>>>> Ask Marc at Aliacta .... it can be done but it's a fair bit of  
>>>>> work.
>>>>
>>>> Yeah... a substantial amount of work...
>>>>
>>>> If I understand Guillermo, the way pgSQL4RB works isn't what he  
>>>> wants
>>>> though.  He literally wants no code execution while waiting for a
>>>> result, yet without wasting CPU.
>>>
>>> Exactly, I need something like the "WaitNextEvent" in the old Mac OS
>>> API but for Socket, that waits for a Socket Event without  
>>> trashing CPU
>>> time.
>>>
>>> I have my app nearly finished but consumes a lot of CPU waiting for
>>> packets, this is a big problem on laptops running on battery power.
>>>
>>> I don't know if would be possible to use semaphores for this  
>>> matter, I
>>> tried it sometime ago but I didn't find  a reliable method.
>>>
>>>         Guillermo

_______________________________________________
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