Message9382
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 |
|
Date |
User |
Action |
Args |
2015-01-14 02:15:57 | zyasoft | set | messageid: <1421201757.19.0.711658680832.issue2202@psf.upfronthosting.co.za> |
2015-01-14 02:15:57 | zyasoft | set | recipients:
+ zyasoft, alex.gronholm, sbenner |
2015-01-14 02:15:57 | zyasoft | link | issue2202 messages |
2015-01-14 02:15:56 | zyasoft | create | |
|