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

feat: LockFileEx/UnLockFileEx methods shouldn't be called explicitly #2564

Merged
merged 5 commits into from
Dec 17, 2024

Conversation

Jklawreszuk
Copy link
Collaborator

PR Details

Stride should avoid direct references to any OS if possible. This PR Hides Lock/UnLockEx methods under already made Lock/Unlock methods that wrap them.

Related Issue

None, but this relates to Stride.Launcher which is using FileLock.Wait method, so this provides cross-platform experience

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change - kind of, but only changes return type from void --> bool

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Eideren
Copy link
Collaborator

Eideren commented Dec 17, 2024

Should this be renamed to TryLockFile instead ?

@Jklawreszuk
Copy link
Collaborator Author

@Eideren Huh...Your're right, It should 😅 I have now added your suggestion

@Jklawreszuk
Copy link
Collaborator Author

oh,yea...I forgot the parentheses. This is the last fix I promise 😆

@Jklawreszuk
Copy link
Collaborator Author

Sorry, I should have just built it myself straight away before sending the PR 🤐 . I've built the project so the test should pass

@Eideren Eideren merged commit aa8ab55 into stride3d:master Dec 17, 2024
3 checks passed
@Eideren Eideren added the area-Core Issue of the engine unrelated to other defined areas label Dec 17, 2024
@Eideren
Copy link
Collaborator

Eideren commented Dec 17, 2024

Thanks !

@Jklawreszuk Jklawreszuk deleted the nativelock branch December 17, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Core Issue of the engine unrelated to other defined areas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants