How to control the number of running workflows?

What is the erlang design pattern in terms of gen_server to create a fixed number of workflows and feed them β€œjobs” to do some things? Each workflow negotiates with an external service that has connection restrictions. The number of "jobs" is considered unlimited. In C, I would do this by creating a workflow pool and asynchronous. queue (with limited capacity), protected by the mutex, for supplying the pool with tasks from the sender.

+4
source share
1 answer

Ask gen_server to install a monitor on your workflows, and when you die (finish or end the failure), enter another one.

+2
source

Source: https://habr.com/ru/post/1300723/


All Articles