Blocking and Specifying Timeout

From InterBase

Go Up to Querying the Services Manager


You can request output of a service task in progress using isc_service_query(). Your call to isc_service_query() does not return until either the request has completed, or the result buffer is full. If there are no data to return because a service task is in progress, the query waits for the task to complete. isc_service_query() blocks indefinitely, until output is available. This eliminates the need for polling.

You can supply to isc_service_query() an SPB item specifying a finite duration after which the call to isc_service_query() must return, even if output from the task is not yet available. Populate the SPB with the SPB version information, followed by the isc_info_svc_timeout cluster identifier, and a four-byte value specifying the number of seconds for the timeout.

This is the only useful SPB cluster for isc_service_query() in the current implementation.

Advance To: