[erlang-questions] Restricting number of executions per second

Ahmed Ali ahmed.nawras@REDACTED
Wed Dec 3 14:41:20 CET 2008

Hi All,

I want to run a function in not more than a specific numbers of times
per second (e.g. 3 times per second). The function is part of a
gen_server process (i.e. called using gen_server:call/2). What's the
best way to do this?

The funny thing is that the first idea I got for a solution is locking
n semaphores to serialize the execution. I guess I'm still locked in
the mainstream paradigm :)

Best regards,


More information about the erlang-questions mailing list