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

feat(maitake-sync): rename EnqueueWait to Subscribe #481

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Jul 20, 2024

maitake-sync's waitmap::Wait future has an enqueue method that
does the same thing as the subscribe methods on WaitCell and
WaitQueue...but has a different name. I think this might be due to
enqueue being added earlier or something, or maybe we just weren't
paying attention. Regardless, I figured it was nicer to use the same
name for the method that does the same thing on these different types.

This commit renames the waitmap::Wait::enqueue method to subscribe,
and the future it returns from EnqueueWait to Subscribe, analogously
to WaitQueue and WaitCell. I've left a deprecated type alias and a
deprecated function alias in place, so this isn't a breaking change:
users who reference Wait::enqueue or EnqueueWait will still be able
to compile their code, but they'll get a warning.

cc @jamesmunns, since I believe you added this API?

`maitake-sync`'s `waitmap::Wait' future has an `enqueue` method that
does the same thing as the `subscribe` methods on `WaitCell` and
`WaitQueue`...but has a different name. I think this might be due to
`enqueue` being added earlier or something, or maybe we just weren't
paying attention. Regardless, I figured it was nicer to use the same
name for the method that does the same thing on these different types.

This commit renames the `waitmap::Wait::enqueue` method to `subscribe`,
and the future it returns from `EnqueueWait` to `Subscribe`, analogously
to `WaitQueue` and `WaitCell`. I've left a deprecated type alias and a
deprecated function alias in place, so this isn't a breaking change:
users who reference `Wait::enqueue` or `EnqueueWait` will still be able
to compile their code, but they'll get a warning.

cc @jamesmunns, since I believe you added this API?
@hawkw hawkw requested a review from jamesmunns July 20, 2024 18:33
Copy link
Collaborator

@jamesmunns jamesmunns left a comment

Choose a reason for hiding this comment

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

hell yeah

@hawkw hawkw merged commit c499252 into main Jul 20, 2024
17 checks passed
@hawkw hawkw deleted the eliza/rename-enqueue branch July 20, 2024 21:55
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