Open moreati opened 6 years ago
Still thinking about it, but thanks, you just helped me notice a bug in unix.py .. connect() is broken if the listener is not the master, because parent_ids isn't fully reproduced to the client
To clarify a little. This is a) half baked b) a what-if. It is not a request, just me thinking out loud. Please feel free to close this issue at will.
There is one addition to the suggested helpers, which is something like "mitogen.is_privileged(context_id)".
(in lieu of a tidier way to do privilege checking from service.py services, CALL_FUNCTION, and any other places I'm already forgetting)
On a related note, I want to move the mitogen.* globals either to Router, or to some new 'identity document' class. There is no reason why a single program couldn't have multiple independent trees running at the same time, and in some cases it may make lots of sense (completely 'airgapped' routing within the same program etc)
Could the 4 variables in
mitogen/__init__.py
be unified into one? Would there be benefit? As noddy example/straw designmitogen.lineage == (0,)
mitogen.lineage == (4, 0)
mitogen.lineage == (42, 4, 0)