-
Notifications
You must be signed in to change notification settings - Fork 178
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
Const method isn't thread safe on Windows #90
Comments
Actually it has not really to do with the question of using One way would be using a mutex but I really would not like to introduce that into filesystem. I need to think about this. |
Change the format of the internal path to native? This is also a performance issue. The WinAPI *W function expects the wchar_t native format path. All calls WinAPI functions in this library use the encoding and format transformation, for example:
|
Yeah, that's of course my favorite solution too, and I started working on that yesterday, I just don't know how fast I can provide that, with the free time I have currently available. So I was thinking about a temporary workaround to mitigate the risk until that work is done. |
Great news! Thank you! Possible workaround: Add macro to select fast and non threadsafe implementation (with mutable _native_cache) or slow and thread-safe (without cache). |
…d/prefixed long filenames working with char value_type again
…nd configurable, all tests working on Windows (wchar_t backend will be stage 3)
Okay, everything is back together, still want to make some additional tests and look into performance, but I chances are, there might be a release v1.5 tomorrow. |
This is now part of release v1.5.0 |
Race condition in all function, who call
GHC_INLINE const path::string_type& path::native() const
, because this method write to mutable variable _native_cache.Proposal:
Switch to native wchar_t storage on Windows.
I think this it shouldn't hurt the "UTF-8 Everywhere" philosophy if all other std::string in API are UTF-8 encoded.
The text was updated successfully, but these errors were encountered: