WHAT THE ACTUAL F?
ProcessPoolExecutor does not work from a venv,
at least on Windows. It fails with a lot of “invalid handle” and
“access denied” errors.
The reason is the usual one that explains everything that goes wrong
on Windows if multiple processes are involved: No
ProcessPoolExecutor creates a pipe to feed commands to a spawned
subprocess. To do that, it lets the subprocess inherit the pipe and
uses the command line to tell it about the handle.
Fatally, the venv
python.exe in turn invokes the “parent” one, with
the same command line, and waits for it to exit to forward the exit
code, but without also letting it inherit the handle again (and how
should it know to do that?).
So the “base” Python, two layers down, gets a handle value on the command line, tries opening it, and finds nothing, or a handle to something unexpected, and dies.
Workaround? No idea. Get the main installation from the Registry,
sys.executable or whatever
concurrent uses to find the
interpreter to run, then fake up a
PYTHONPATH and cross ten packets
of fish fingers. Oh, and do not expect to use the interpreter you do
that in for much else afterwards, I suppose.
I just dropped my tablet pen onto the keyboard, and somehow that resulted in an absolutely huge mouse pointer. Huh?
Resetting is simple; just switch to another pointer scheme and back.
What strange key combination did the pen hit to cause this? The list of accessibility shortcuts does not have an entry that fits.