-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor scheduler and worker creation (#539)
This commit eliminates unnecessary Option<T> fields, two-phase initialization and unsafe get_mut_unchecked call in GCWorkScheduler. We consider MMTK, GCWorkScheduler and GCWorkerShared as shared data between threads, and GCWorker and GCController as private data of the workers and the controller. We now create shared data, including all GCWorkerShared structs, before spawning any GC threads. This means we no longer spawn GC threads before GCWorkScheduler is fully initialized, and eliminated some unsafe operations. We temporarily make Options::threads only settable via environment variable, because we now create GCWorkerShared instances when GCWorkScheduler is created, which is usually static.
- Loading branch information
Showing
9 changed files
with
138 additions
and
169 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.