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

need to start the simulator after create to avoid race #10349

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

tballmsft
Copy link
Contributor

@tballmsft tballmsft commented Jan 23, 2025

A very infrequent race condition occurs where the extension's simulator appears and the micro:bit simulator never appears. This is very curious, as the extension simulator can only be invoked by static typescript (user-level code), which must be executing, which should bring up the micro:bit simulator. The problem is that the start function of simulatorDriver does not start the simulator in the case when it is being created the first time. Most often, some other path then creates the simulator, and the start function is called, which does start the simulator. But this change ensures the the micro:bit simulator will always appear first.

Image

Copy link
Member

@riknoll riknoll left a comment

Choose a reason for hiding this comment

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

this is adding pxt-microbit as a submodule. i'm guessing that's accidental, but definitely needs to be fixed

@tballmsft
Copy link
Contributor Author

thanks for that catch, richard... i had mistakenly done a git clone of pxt-microbit inside pxt!

@tballmsft tballmsft requested a review from riknoll January 24, 2025 00:28
@tballmsft tballmsft merged commit 5f1baca into master Jan 24, 2025
6 checks passed
@tballmsft tballmsft deleted the dev/tball/simulator-race branch January 24, 2025 18:39
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