I would only support such a threadPool()
if it tied itself to the lifetime of the scripting environment, killing off pending tasks on scripting restart, refusing new tasks at that point, and killing any running tasks within a few seconds. It is otherwise extremely unsafe (memory leaking) if given tasks with long durations, scheduled more than a few seconds in the future, or anything repeating.
I strongly encourage construction of queues holding native jython or java objects instead of code. More details here (read the whole topic):