docs: mention another __main__ safeguard

pull/618/head
David Wilson 5 years ago
parent 1d41adb346
commit e12f391106

@ -673,8 +673,12 @@ code occurring after the first conditional that looks like a standard
if __name__ == '__main__':
run_some_code()
This is a hack, but it's the least annoying hack I've found for the problem
yet.
To further avoid accidental execution, Mitogen will refuse to serve
:mod:`__main__` to children if no execution guard is found, as it is common
that no guard is present during early script prototyping.
These are hacks, but they are the safest and least annoying found to solve the
problem.
Avoiding Negative Imports

Loading…
Cancel
Save