fsspec / gcsfs

Pythonic file-system interface for Google Cloud Storage
http://gcsfs.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
334 stars 143 forks source link

close_session: clean up loop handling #606

Closed pgcamus closed 7 months ago

pgcamus commented 7 months ago

Previously we were potentially running cleanup on a different event loop, even if the session's associated event loop was active. This manifested in RuntimeError instances being raised when synchronous cleanup was attempted. Change cleanup to always use the session's associated event loop and add some logging when things have gone wrong.