coralnet / pyspacer

Python based tools for spatial image analysis
MIT License
6 stars 2 forks source link

S3 downloads are now always performed in the main thread #87

Closed StephenChan closed 5 months ago

StephenChan commented 5 months ago

This is to prevent RuntimeError: cannot schedule new futures after interpreter shutdown, similar to https://github.com/coralnet/coralnet/pull/527. The error was happening at this part of pyspacer's code when the backend_main view tried to get the valresults of a classifier.

In terms of what this workaround means for performance, this should only affect performance if a pyspacer-dependent program were trying to parallelize S3 downloads using multithreading. Multiprocessing should be unaffected.