Subject Re: FB 2.5 trace, read trace data with isc_info_svc_timeout
Author hvlad
--- In firebird-support@yahoogroups.com, "marcinmisiewicz" <marcinmisiewicz@...> wrote:
>
> Im trying to use new trace API. I can start/stop trace service.
> I can read its output with isc_service_query but when there is no data left to read my app hangs and waits for data, so i decided i will add isc_info_svc_timeout param to the isc_service_query call. I use Delphi and IBX, i modified TIBCustomService.InternalServiceQuery to use timeout param but with no luck, I mean it looks like its ok, i can query trace data but when there is no more data my app still hangs and wiats for new data. What am I doing wrong?

You can look at SVN to see how fbtracemgr used timeouts :

http://firebird.svn.sourceforge.net/viewvc/firebird/firebird/branches/B2_5_Release/src/utilities/fbtracemgr/traceMgrMain.cpp?revision=53037&view=markup

look at TraceSvcUtil::runService() method, near line 218

Regards,
Vlad

PS If you want to be efficient, don't use timeouts, use threads.