Jordan Bracco
d81be41024
Split do_limit
2020-09-08 12:03:25 +02:00
Jordan Bracco
12490aa78a
Sentinel processes - ensure counter is always decremented
2020-09-08 11:44:47 +02:00
Jordan Bracco
3aa46650e2
Fix behaviour of max_waiting = 0 with max_running = 1
2020-09-05 09:33:25 +02:00
href
6f45866724
Merge branch 'fix/trap-exits' into 'master'
...
Fix counters not decrementing when the process is exited
See merge request pleroma/elixir-libraries/concurrent_limiter!1
2020-09-05 07:30:49 +00:00
rinpatch
8c1caa0f10
Fix counters not decrementing when the process is exited
...
This fixes the issue by trapping exits for the duration of the fun,
then turning exit trapping off and killing the process if there is an
exit message in the mailbox.
The real-world case where this fixes things is Pleroma MediaProxy.
Without exit trapping, the process would get killed if the connection
was closed client-side and a counter would be left incremented.
I am not sure if trapping exits is the optimal solution, but I don't
see any other option.
2020-09-05 00:02:54 +03:00
Jordan Bracco
55e92f84b4
Fix decrement after max_retries been reached + telemetry events
2020-07-07 16:32:28 +02:00
Jordan Bracco
8eee96c6ba
0.1.0 (for realz)
2020-05-16 12:46:42 +02:00
Jordan Bracco
68f4cd2c37
0.1.0.
2020-05-16 12:44:29 +02:00
Jordan Bracco
5bc10fff60
Fix tests & add ConcurrentLimiter.delete/1
2020-05-16 12:39:22 +02:00
Jordan Bracco
447b4c9a2e
Format and prepare for release
2020-05-16 12:22:30 +02:00
Jordan Bracco
fb0bcf9e8d
Remove ETS backend, add max_retries, add options to limit/3.
2020-05-14 22:38:29 +02:00
Jordan Bracco
9f95ba8f65
Rename to ConcurrentLimiter
2020-05-14 22:14:09 +02:00
Jordan Bracco
f5ad9dcd31
minor fixes
2020-05-08 20:48:05 +02:00
Jordan Bracco
b541ef9674
Switch to atomics, add shared ets, ..
2020-05-08 20:10:33 +02:00
Jordan Bracco
554524db9b
Initial commit
2020-05-08 01:55:49 +02:00