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

Fix race condition in symlink creation in the update script #48

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

cameel
Copy link
Member

@cameel cameel commented Jul 27, 2020

Fixes the issue we encountered in #46 (comment). Part of ethereum/solidity#9258.

The problem is that I made processing of emscripten-wasm32/ dir wait until wasm finishes processing its files but the link creation that happens at that point is still asynchronous.

There are multiple updateSymlink() calls in a loop so one solution would be to wait for all of them using Promises. But for simplicity I just made updateSymlink() synchronous instead.

…onditions

- Currently link creation is asynchronous and often completes when the processDir() call has already scanned the directory. This way processDir() misses the new link.
- To keep it asynchronous could wait for multiple calls to finish using Promises. But I think that just making it synchronous is less intrusive.
@cameel cameel force-pushed the fix-update-script-symlink-race-condition branch from 738c7df to 7b3b60c Compare July 28, 2020 11:35
@chriseth chriseth merged commit d10fac3 into gh-pages Jul 28, 2020
@cameel cameel deleted the fix-update-script-symlink-race-condition branch July 28, 2020 14:15
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.

2 participants