Message9382

Author zyasoft
Recipients alex.gronholm, sbenner, zyasoft
Date 2015-01-14.02:15:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421201757.19.0.711658680832.issue2202@psf.upfronthosting.co.za>
In-reply-to
Content
It would be useful to keep the thread name set if using the Java API with PythonInterpreter because it's quite useful for debugging.

So here's one possible context that could be used to distinguish. One possible solution is that if the first user thread in Java is always named "main", regardless of the internationalization in the OS, then we could simply check in this setup:

class _MainThread(Thread):
    def __init__(self):
        Thread.__init__(self, name="MainThread")
        import atexit
        atexit.register(self.__exitfunc)

This would then distinguish from Jython as invoked through org.python.util.jython
History
Date User Action Args
2015-01-14 02:15:57zyasoftsetmessageid: <1421201757.19.0.711658680832.issue2202@psf.upfronthosting.co.za>
2015-01-14 02:15:57zyasoftsetrecipients: + zyasoft, alex.gronholm, sbenner
2015-01-14 02:15:57zyasoftlinkissue2202 messages
2015-01-14 02:15:56zyasoftcreate