You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrade jython from 2.5.2 to 2.7.4-Unavailibility of _thread package #354
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.
Thanks for exploring 2.7.4. Underscore-anything is always lilkely to be unstable -- a widespread convention, not just in Python. The missing code seemed to exist for the benefit of the Python threading.py library module.
It looks like this is the change to blame: 41cdc88 (Ten years old next Thursday!)
Activity
jeff5 commentedon Aug 29, 2024
Thanks for exploring 2.7.4. Underscore-anything is always lilkely to be unstable -- a widespread convention, not just in Python. The missing code seemed to exist for the benefit of the Python
threading.pylibrary module.It looks like this is the change to blame: 41cdc88 (Ten years old next Thursday!)
In the same change, we see the needs of
threading.pymet in a different way, so perhaps that gives a model for code you could use in your application?41cdc88?diff=unified&w=0#diff-b250d3d0e0d909784a67083e9069ce507513a67e8514a011e2f364027e25e0b0