Skip to content

Conversation

dmurvihill
Copy link
Contributor

Consider merging this next time you choose to publish breaking changes. It wraps the weight and priority options into a single object, preserving the same default values as before.

Users who do not pass the weight or priority arguments should be unaffected.

@DirtyHairy
Copy link
Owner

DirtyHairy commented Mar 12, 2024

After thinking about it, I'd rather overload the affected methods to allow both signatures and annotate the old signature as deprecated. This could be released immediately, and we can remove the old signature in a 0.6.0 (or maybe even 1.0.0, I think eight years are long enough for a major release 😏 ).

semaphore.acquire({ weight: 1, priority: 5 }) // Equivalent

semaphore.acquire(2) // Old
semaphore.acquire({ weight: 5 }) // New
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, that's not the same weight!

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