Subject | Re: [firebird-support] DELAY OR WAIT |
---|---|
Author | Martijn Tonies |
Post date | 2004-12-11T12:56:43Z |
Hi,
But what's wrong with consuming all CPU time? The server itself
should schedule the threads.
If you really like, you COULD create an UDF that does the "wait"
for you, as an UDF blocks execution of the thread that executes it.
I think.
Just double check with someone who knows ;-) -- that the UDF
call doesn't block the whole server.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> Are there any supported functions in SQL to doNo, there isn't.
> command delay :
> delay(msec)
> or
> wait(msec) ?
>
> lets say is system service stored proc :
> while not (exists (select * blah blah)) do
> begin
> delay(1500);
> end
> If I run such statement without delay it would consume all CPU.
But what's wrong with consuming all CPU time? The server itself
should schedule the threads.
If you really like, you COULD create an UDF that does the "wait"
for you, as an UDF blocks execution of the thread that executes it.
I think.
Just double check with someone who knows ;-) -- that the UDF
call doesn't block the whole server.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com