2

In CPython, GIL doesn't let Python code run in parallel threads but GIL is released when I/O operation is performed.

Say there are several relatively lengthy I/O operations: dump some raw data to file, create log file entry and perform Postgres query. If I run all of them via ThreadPoolExecutor, will they run in parallel?

Are my initial assumptions correct?

George Sovetov
  • 4,942
  • 5
  • 36
  • 57

0 Answers0