Supervisor callback for child normal exit

Posted by Aler on Stack Overflow See other posts from Stack Overflow or by Aler
Published on 2011-01-12T18:51:10Z Indexed on 2011/01/12 18:53 UTC
Read the original article Hit count: 230

Filed under:
|

I am creating a test app where is one supervisor with simple_one_for_one strategy and many worker children added dynamically to it. How to implement callback (or receive a message) in supervisor that will be called when child exit normally?

Main goal is to notify some other process that all supervised worker processes are done and it's time to show final report.

How to design such kind of behavior? Should I create my own behavior that combine supervisor and gen_server, or there is a way to do this with standard otp behaviors?

© Stack Overflow or respective owner

Related posts about erlang

Related posts about otp