Skip to content

add file lock to coordinate racing cargo gpu installs#622

Open
Firestar99 wants to merge 1 commit into
mainfrom
install_file_lock
Open

add file lock to coordinate racing cargo gpu installs#622
Firestar99 wants to merge 1 commit into
mainfrom
install_file_lock

Conversation

@Firestar99

@Firestar99 Firestar99 commented Jun 26, 2026

Copy link
Copy Markdown
Member
  • tested locally via cmdline and project with two shader crates competing

close #621

@LegNeato LegNeato left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

File locking in notorious to get right with all the edge cases...perhaps we should use https://crates.io/crates/fd-lock or https://crates.io/crates/gix-lock or https://crates.io/crates/fslock ?

@Firestar99

Copy link
Copy Markdown
Member Author

My read was that many of those crates were made before file locking was added to the standard library August last year. Since them, even cargo adopted the functions from std.

The bit of custom struct FileLock I build is merely for pretty printing a message when it'll wait for the lock.

@Firestar99 Firestar99 marked this pull request as ready for review July 2, 2026 12:59
@Firestar99 Firestar99 requested a review from eddyb as a code owner July 2, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent SPIR-V codegen building causes issues

2 participants