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.
This transforms our multithreaded daemon into a single-threaded one.
This is the culmination of various big refactors I worked on since the last release. In particular, this is only possible because:
Arc<Mutex>
everywhere.Without either of those, this refactor either wouldn't work or wouldn't bring many tangible benefits. But, because of them, this will make the daemon as efficient as it gets, as we are no longer spawning superfluous threads everywhere and keeping them in sync through locks and a weird polling system. It also completely eliminates any race conditions within the daemon (though race conditions related to the compositor or daemon-client interaction will remain).