This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2021-06-16.15:14:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1623856492.52.0.00612312298531.issue44434@roundup.psfhosted.org>
In-reply-to
Content
_thread.start_new_thread() always called "exit thread", since the function was added to Python:

commit 1984f1e1c6306d4e8073c28d2395638f80ea509b
Author: Guido van Rossum <guido@python.org>
Date:   Tue Aug 4 12:41:02 1992 +0000

    * Makefile adapted to changes below.
    * split pythonmain.c in two: most stuff goes to pythonrun.c, in the library.
    * new optional built-in threadmodule.c, build upon Sjoerd's thread.{c,h}.
    * new module from Sjoerd: mmmodule.c (dynamically loaded).
    * new module from Sjoerd: sv (svgen.py, svmodule.c.proto).
    * new files thread.{c,h} (from Sjoerd).
    * new xxmodule.c (example only).
    * myselect.h: bzero -> memset
    * select.c: bzero -> memset; removed global variable

static void
t_bootstrap(args_raw)
        void *args_raw;
{
        object *args = (object *) args_raw;
        object *func, *arg, *res;

        restore_thread((void *)NULL);
        func = gettupleitem(args, 0);
        arg = gettupleitem(args, 1);
        res = call_object(func, arg);
        DECREF(arg); /* Matches the INCREF(arg) in thread_start_new_thread */
        if (res == NULL) {
                fprintf(stderr, "Unhandled exception in thread:\n");
                print_error(); /* From pythonmain.c */
                fprintf(stderr, "Exiting the entire program\n");
                goaway(1);
        }
        (void) save_thread();
        exit_thread();
}

exit_thread() was partially replaced with PyThread_exit_thread() in:

commit bcc207484a0f8f27a684e11194e7430c0710f66d
Author: Guido van Rossum <guido@python.org>
Date:   Tue Aug 4 22:53:56 1998 +0000

    Changes for BeOS, QNX and long long, by Chris Herborth.
History
Date User Action Args
2021-06-16 15:14:52vstinnersetrecipients: + vstinner
2021-06-16 15:14:52vstinnersetmessageid: <1623856492.52.0.00612312298531.issue44434@roundup.psfhosted.org>
2021-06-16 15:14:52vstinnerlinkissue44434 messages
2021-06-16 15:14:52vstinnercreate