[erlang-questions] nif driver c code must be reentrant?

Scott Lystig Fritchie fritchie@REDACTED
Tue May 21 20:13:57 CEST 2013


Dan Gudmundsson <dangud@REDACTED> wrote:

dg> [...]
dg>         erlang:bump_reductions(1000000)
dg> [...]

Dan, that prompts a good question that has been bugging several people
(including me).  Does this 1 million reduction count bump have an effect
more than a 2000 reduction bump?  IIRC, a process is scheduled out after
2000 reductions.  And my (poor) memory says that the reduction count
starts at 2000, that count is decremented, and a scheduling decision is
made when the reduction count goes negative.

Does it really make a difference if the count goes negative by a little
(e.g., only one) or by a lot (e.g., 999,990)?

-Scott



More information about the erlang-questions mailing list