Greenlet emulation for Jython using threads