Subject | AW: [firebird-support] Re: DELAY OR WAIT |
---|---|
Author | Alexander Gräf |
Post date | 2004-12-12T22:50:36Z |
> -----Ursprüngliche Nachricht-----In his case, he should simply use triggers, which get fired when a new entry is inserted/updated etc.. An SP could then check, if the condition is satisfied, and execute the desired action.
> Von: Adam [mailto:s3057043@...]
> Gesendet: Sonntag, 12. Dezember 2004 23:30
> An: firebird-support@yahoogroups.com
> Betreff: [firebird-support] Re: DELAY OR WAIT
>
>
>
> You could create it as a UDF call without too much fuss.
> Probably better off using WaitForSingleObject (presuming
> windows here), and set the timeout to whatever delay you pass
> in. WaitForSingleObject is generally much more efficient than
> polling a clock.
>
Anyway, WaitForSingleObject can only be used with an object. There is also the simply function Sleep(msecs) which could be coded into an UDF. However, I cannot see why someone would like to block one of the servers threads until a special condition is met. Better return control to the client as soon as possible.
Regards, Alex