Skip to content

ref(hub): Remove boolean to track if we are using process hub#1125

Open
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/process-hub-structfrom
szokeasaurusrex/thread-hub-simplification
Open

ref(hub): Remove boolean to track if we are using process hub#1125
szokeasaurusrex wants to merge 1 commit intoszokeasaurusrex/process-hub-structfrom
szokeasaurusrex/thread-hub-simplification

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex commented May 7, 2026

Instead, it is simpler just to set the THREAD_HUB to the PROCESS_HUB (or, more specifically, an Arc-clone of it).

Stacked on #1124

Instead, it is simpler just to set the `THREAD_HUB` to the `PROCESS_HUB` (or, more specifically, an Arc-clone of it).
{
THREAD_HUB.with(|(hub, is_process_hub)| {
if is_process_hub.get() {
f(&PROCESS_HUB.hub)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As I understand it, this was the sole purpose of is_process_hub: so that when we are on the thread that created the hub, the current hub is the PROCESS_HUB.

The changes here eliminate the need to track is_process_hub separately, since we just make the thread hub an arc-clone of the process hub on the thread that creates the process hub.

@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review May 8, 2026 09:23
@szokeasaurusrex szokeasaurusrex requested a review from lcian as a code owner May 8, 2026 09:23
@szokeasaurusrex szokeasaurusrex requested a review from giortzisg May 8, 2026 09:23
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.

1 participant