Subject Re: [firebird-support] Re: Event progamming, application do not stop
Author Dimitry Sibiryakov
On 11 Mar 2006 at 7:49, tailuo2002 wrote:

>When working on synchronous mode ,I think if no event occurs, the
>application shoud stop at isc_wait_for_event() and suspend. After an
>event occurs, the application then continues running.

IB (and FB) events work a bit different from your ideas. They use
"counters". First call of isc_wait_for_event() deliver to you current
values of counters and thus return immediatelly. Subsequent calls
will wait for events to really happen.

>isc_wait_for_event();
// get current counters
isc_wait_for_event();
>// stop here, dont'return until any event notifications arrive.
// and then get me new counters
>
>printf("I'm here! \n");

--
SY, Dimitry Sibiryakov.