[*] Harden awaiting unlock via RuntimeWaitForSecondaryTick() usage under linux
This commit is contained in:
parent
cb69a7e737
commit
937016e9f3
@ -248,9 +248,14 @@ namespace Aurora::IO
|
||||
|
||||
if (!FS::ApplyDumbAdvisoryLock(iFileDescriptor, create.eAdvisoryLevel))
|
||||
{
|
||||
SysPushErrorIO("Couldn't open file: {}. File node (not section) is locked.", path);
|
||||
::close(iFileDescriptor);
|
||||
return false;
|
||||
RuntimeWaitForSecondaryTick();
|
||||
|
||||
if (!FS::ApplyDumbAdvisoryLock(iFileDescriptor, create.eAdvisoryLevel))
|
||||
{
|
||||
SysPushErrorIO("Couldn't open file: {}. File node (not section) is locked.", path);
|
||||
::close(iFileDescriptor);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (create.bFailIfNonEmptyFile)
|
||||
@ -288,7 +293,6 @@ namespace Aurora::IO
|
||||
this->bFlushOnClose = create.bFlushOnClose;
|
||||
|
||||
this->path = create.path;
|
||||
|
||||
return this->IsValid();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user