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

Remove dead file locking code #38

Merged
merged 1 commit into from
May 20, 2019
Merged

Conversation

Ralith
Copy link
Contributor

@Ralith Ralith commented May 3, 2019

Split from #20

The loader design doc says:

7.5.3. Active Runtime File Management

Several utility functions are provided to help manage the active runtime manifest file. Of primary importance are the functions platformLockGlobalRuntimeFile and PlatformUnlockGlobalRuntimeFile which lock the file from being overwritten. These are defined in src/common/platform_utils.hpp

NOTE: This is outside of the loader source to allow other items in the source folder to use these utilities.

However, there are no references to these functions whatsoever, they do not appear to be a part of any public interface, and it's unclear what use they might have.

@rpavlik
Copy link
Contributor

rpavlik commented May 6, 2019

Thanks for the patch - I've raised an internal issue to look into this.

@daveh-lunarg
Copy link
Contributor

I've had a chance to discuss with @MarkY-LunarG the intent behind this file locking code. Originally intended as a mechanism to prevent multiple runtimes from being loaded simultaneously, but later removed (or calls removed, leaving this as dead code) as not super effective for the task and WG discussion may have raised some scenarios where multiple runtimes might be allowed/useful (? dunno - before my time).

Just on principle of not allowing unused code to rot within the repo, I'm happy to see this code excised. I'll remove the reference in the loader design doc to agree.

@brycehutchings
Copy link
Contributor

Happy to see this go because it doesn't even work on Windows where the registry key can't be locked like a file can.

@daveh-lunarg
Copy link
Contributor

Accompanying PR to remove the locking discussion from the loader design document is PR #50

Copy link
Contributor

@daveh-lunarg daveh-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Builds/tests with no adverse affect on Windows for me.

@daveh-lunarg daveh-lunarg merged commit 86f9227 into KhronosGroup:master May 20, 2019
@Ralith Ralith deleted the dead-code branch May 20, 2019 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants