pjh40 opened a new issue, #41815:
URL: https://github.com/apache/arrow/issues/41815

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When `pyarrow.write_feather()` is given a `pandas.DataFrame`, 
`write_feather()` unconditionally calls `Table.from_pandas()` with the default 
`nthreads=None` argument.  This is then passed to 
`pandas_compat.dataframe_to_arrays()`, allowing it to heuristically use a 
`concurrent.futures.ThreadPoolExecuter` to convert columns.  This causes a 
runtime error when `write_feather` is used in an `atexit` (or 
`weakref.finalize`) context on exit of the interpreter:
   ```
   RuntimeError: cannot schedule new futures after interpreter shutdown
   ```
   This scenario can be avoided by adding a `use_threads` parameter to 
`write_feather` that can be used to force serial operation.
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to