Main message loop for partition processes.
Each SuperWorker.Supervisor runs one or more partitions; every partition
executes main_loop/1, which receives and dispatches:
- public API messages (
{:public_api, %Message{}}) sent by users through theSuperWorker.SupervisorAPI; - internal API messages (
{:internal_api, %Message{}}) exchanged between the supervisor master and its partitions (partition lists, restarts, shutdown); - worker
:DOWNmessages, which trigger restart handling according to the restart strategy of the worker's parent (standalone/group/chain); EXITmessages from linked outside processes (ignored).
The loop only exits when a deliberate shutdown is requested.