Move some of Controller's global state to the worker module#2361
Merged
stevenengler merged 4 commits intoshadow:mainfrom Aug 18, 2022
Merged
Move some of Controller's global state to the worker module#2361stevenengler merged 4 commits intoshadow:mainfrom
Controller's global state to the worker module#2361stevenengler merged 4 commits intoshadow:mainfrom
Conversation
a67374c to
b0ee86a
Compare
sporksmith
approved these changes
Aug 17, 2022
The controller is currently globally accessible through the global worker pool, but since the controller exists on the stack, this is not allowed in rust. This breaks out some of the global state into a new global object. Accesses to this global state is made explicit through a `worker::WORKER_SHARED` static variable.
b0ee86a to
5d25640
Compare
stevenengler
added a commit
to stevenengler/shadow
that referenced
this pull request
Aug 18, 2022
stevenengler
added a commit
that referenced
this pull request
Aug 18, 2022
Fixed warning about unneeded `unsafe` from #2361
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Controlleris currently globally accessible through the global worker pool, but since the controller exists on the stack, this is not allowed in rust (unless we useBox::leak). This breaks out some of the global state into a new global object. Accesses to this global state is made explicit through aworker::WORKER_SHAREDstatic variable.