There should be a function to create a "mutex" with a ratelimit:
mkratelimit('something', 4, 1000).throttle()
This would get a reference to a global something ratelimit, block all script executions and make sure that only 4 can pass every 1 second. This is necessary because there's no global state that you could use to determine usage by other scripts.
There should be a function to create a "mutex" with a ratelimit:
This would get a reference to a global
something
ratelimit, block all script executions and make sure that only 4 can pass every 1 second. This is necessary because there's no global state that you could use to determine usage by other scripts.