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 r_task::initialize() timing issue #566

Merged
merged 3 commits into from
Oct 4, 2024
Merged

Conversation

DavisVaughan
Copy link
Contributor

@DavisVaughan DavisVaughan commented Oct 4, 2024

Both modules::initialize() and resource_loaded_namespaces() call r_task::spawn_idle(). Even though that is async, it blocks until the task channels are initialized, so r_task::initialize() has to run first!


We didn't catch this during testing because r_task::spawn_idle() has that escape hatch during testing and just runs immediately. But CI in Positron caught an issue, and it was easy to reproduce by just starting up R with the latest version of ark in Positron. Things crashed immediately.

@DavisVaughan DavisVaughan merged commit c16fc33 into main Oct 4, 2024
6 checks passed
@DavisVaughan DavisVaughan deleted the fix/r-task-during-startup branch October 4, 2024 14:48
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2024
@lionel-
Copy link
Contributor

lionel- commented Oct 5, 2024

We didn't catch this during testing because r_task::spawn_idle() has that escape hatch during testing and just runs immediately.

That's a good reason to switch to an independent binary in integration tests, so we don't hit any testing path at all: #562.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants