Why should I uses Tasks instead of Pools?

Another reason is that with one off processes you have less to worry about and you must be a bit more careful with long running processes not to introduce memory leaks e.g. by “touching” a big binary that is then referenced from a process that never dies.

Here are few links:

https://andy.wordpress.com/2012/02/13/erlang-is-a-hoarder/

Generally it’s not something that happens often, but on the other hand creating and killing a process is very cheap, so I’d default to that unless I really want a long lived process.

1 Like