ericsnowcurrently / multi-core-python

Enabling CPython multi-core parallelism via subinterpreters.
BSD 3-Clause "New" or "Revised" License
245 stars 6 forks source link

Interpreter.run() should also accept a function, a method or a code object #64

Open thedrow opened 4 years ago

thedrow commented 4 years ago

Right now, forcing the user to write explicit code when calling run() isn't convenient. We could accept a code object instead or fetch it from a callable using inspect.

ericsnowcurrently commented 4 years ago

This is a good idea, but one which will take a bunch more work than the minimal functionality PEP 554 specifies. See https://www.python.org/dev/peps/pep-0554/#interpreter-call.

We can circle back to this once PEP 554 is accepted and landed.