(func)
Set a profile function for all threads started from the threading module.

    The func will be passed to sys.setprofile() for each thread, before its
    run() method is called.
Set a profile function for all threads started from the threading module.
Set a profile function for all threads started from the threading module .
def setprofile(func):
    """Set a profile function for all threads started from the threading module.

    The func will be passed to sys.setprofile() for each thread, before its
    run() method is called.

    """
    global _profile_hook
    _profile_hook = func
def setprofile ( func ) : global _profile_hook _profile_hook = func