Christian Heimes <li...@cheimes.de> added the comment:
Besindes tests, PR also needs documentation and a better definition how and when the hook is called. * IMO it should be called after profiling and tracing hook, so non-trivial hooks can be profiled and traced. * It's important to define and document, which thread runs the hook (calling thread or new thread). * Since the hook is designed to monitor thread creation, would it make sense to pass the thread object to the hook? * How does the hook behave when the callback raises an exception? * Is a single hook good enough or should the API behave more like atexit, which supports an abitrary amount of hooks? * Instead of just a creation hook, how about lifetime hooks are also called when a thread ends? ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42443> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com