Subject Re: Generators of firebird or our own generator
Author Adam
--- In, "women_lover_best"
<talbronstien@g...> wrote:
> Hi Adam,
> if i call UDf function in a stored procedure,in a transaction..wont
> it be thread safe?

I assume that there would be some module that the UDF would need to
call. This module would need to handle concurrent threads requesting
numbers ensuring it does not give out duplicates. The only way to do
this is to use a mutex or equivalent around the increment and collect
code which effectively serializes the requests.

But generators take care of all that for you, and you probably
wouldn't bother porting your application to a DBMS that doesn't have
something at least similar in concept.