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

Remove intrinsics usage in RibCoroutineWorker #627

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

psteiger
Copy link
Contributor

@psteiger psteiger commented Nov 30, 2023

Currently, we need to build both bindJob and unbindJob synchronously (CoroutineScope.bind is not suspending and must return a handle with both jobs).

In order to synchronously get an instance of bindJob, we start the unbindJob coroutine undispatched (bindJob is a child of unbindJob, so we need an instance of unbindJob to create an instance of bindJob).

This commit changes dispatching logic to a much simpler one that does not require usage of intrinsics: after saving bindJob, we properly dispatch in a cancellable way by simply launching a new coroutine.

This commit changes dispatching logic to a much simpler one that does not require usage of intrinsics.

In order to synchronously get an instance of `bindJob`, we start the `unbindJob` coroutine undispatched (`bindJob` is a child of `unbindJob`, so we need an instance of `unbindJob` to create an instance of `bindJob`).

After saving `bindJob`, we properly dispatch in a cancellable way by simply `launch`ing a new coroutine.
@psteiger psteiger merged commit 08b95b6 into uber:main Oct 14, 2024
4 checks passed
@psteiger psteiger deleted the simplify-rrw branch October 14, 2024 09:34
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.

2 participants