Thread safety of filesystem APIs

Does anyone know what is the thread safety status of the functions in the filesystem API of SDL3 (SDL_GetBasePath, SDL_GetPrefPath, etc)? The docs for those don’t mention anything about threads. Is it safe to call them from outside of the main thread? Those things can vary wildly between platforms so the fact that it works for me is no guarantee that it should always work on other platforms.

3 Likes

Actually, this is a good question. I’ve opened an issue to do some research on it:

1 Like

We decided these should be marked as thread safe, and if they turn out not to be on a specific platform, it should be considered a bug to be fixed.

I’ve updated the docs.

1 Like

Cool, thank you for confirming this!

1 Like