You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #55, but not quite the same ... using lfs.mkdir() is not thread safe. Because it is not idempotent it is quite common to wrap it in a check such as:
ifnotlfs.attributes(path, "mode") =="directory" thenlfs.mkdir(path)
end
Unfortunately in a multi-threaded environment is is possible for the directory check to return false but another thread to create the directory in the intervening milliseconds.
A new flag needs to be added so that ERROR_FILE_EXISTS is considered a success because no operation was needed. It's likely the existing syscalls can be leveraged by passing the right flags so the success is properly reported.
The text was updated successfully, but these errors were encountered:
Related to #55, but not quite the same ... using
lfs.mkdir()
is not thread safe. Because it is not idempotent it is quite common to wrap it in a check such as:Unfortunately in a multi-threaded environment is is possible for the directory check to return false but another thread to create the directory in the intervening milliseconds.
A new flag needs to be added so that
ERROR_FILE_EXISTS
is considered a success because no operation was needed. It's likely the existing syscalls can be leveraged by passing the right flags so the success is properly reported.The text was updated successfully, but these errors were encountered: