Upgrade jython from 2.5.2 to 2.7.4-Unavailibility of _thread package.
The _threading.class used to have
public static Map<Long, PyObject> _threads = (new MapMaker()).weakValues().makeMap();
public static Map<Thread, PyObject> _jthread_to_pythread = (new MapMaker()).weakKeys().weakValues().makeMap();
public static Map<Long, PyObject> _active = _threads;
public static void _register_thread(Thread jthread, PyObject pythread) {
_threads.put(Long.valueOf(jthread.getId()), pythread);
_jthread_to_pythread.put(jthread, pythread);
}
public static void _unregister_thread(Thread jthread) {
_threads.remove(Long.valueOf(jthread.getId()));
}
and was further used.
We had been using this in our python scripts.
Please share the alternatives for the above in the latest version. Couldn't find their alternatives in the documentations.
Looking forward for a quick response.
Upgrade jython from 2.5.2 to 2.7.4-Unavailibility of _thread package.
The _threading.class used to have
public static Map<Long, PyObject> _threads = (new MapMaker()).weakValues().makeMap();
public static Map<Thread, PyObject> _jthread_to_pythread = (new MapMaker()).weakKeys().weakValues().makeMap();
public static Map<Long, PyObject> _active = _threads;
public static void _register_thread(Thread jthread, PyObject pythread) {
_threads.put(Long.valueOf(jthread.getId()), pythread);
_jthread_to_pythread.put(jthread, pythread);
}
public static void _unregister_thread(Thread jthread) {
_threads.remove(Long.valueOf(jthread.getId()));
}
and was further used.
We had been using this in our python scripts.
Please share the alternatives for the above in the latest version. Couldn't find their alternatives in the documentations.
Looking forward for a quick response.