Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible threading conflict / non-reentrancy #18

Open
mrd opened this issue Jul 26, 2023 · 0 comments
Open

Possible threading conflict / non-reentrancy #18

mrd opened this issue Jul 26, 2023 · 0 comments

Comments

@mrd
Copy link

mrd commented Jul 26, 2023

gdal.Warp('/vsimem/reprojected.tif', dsm_raster_file, srcSRS=f"EPSG:{dsm_crs}", dstSRS=f"EPSG:{epsg}")

The reference to /vsimem/reprojected.tif appears to act like a temporary file on some sort of RAM disk provided by GDAL. One issue might crop up if a user of this library runs this function more than once from different threads in the same process: they would conflict over usage of this virtual file. According to the docs, it is possible for multiple threads to access the same virtual file through GDAL, and coordination is the responsibility of the programmer. So you may want to use generated file names (and ensure clean-up with a finally clause, which is another bug that is not yet resolved).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant