[erlang-questions] os:timestamp() uses mutex lock
Fri Jan 22 11:46:21 CET 2010
We have checked, and it is actually unnecessary to have the mutex lock
in the os:timestamp case.
The fastest way for you to get this changed is to do it yourself and
provide it as a patch to the
pu branch at github. See instructions for how to provide patch at
/Kenneth Erlang/OTP Ericsson
On Thu, Jan 21, 2010 at 6:35 PM, Jonas Falkevik
> Using erlang:now() for taking time stamps is slowing things down if you try
> to do it in parallell due to the guarantee of uniqueness hence a mutex lock
> and serialization of the execution.
> But what if you don't need the uniqueness and would like to trade it to be
> able to run things in parallell and with smaller overhead?
> In R12 you would need to implement a new BIF.
> In R13 with the introduction of NIF's it is easy to implement and deploy
> your own modified now().
> But in R13 the function os:timestamp() seems to have been introduced as
> well, which does not have the uniqueness but still the mutex lock.
> What is the need of the mutex lock in this function?
> Any other way?
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions