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

Unfriend reactor from message queues #2299

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xemul
Copy link
Contributor

@xemul xemul commented Jun 18, 2024

The alien and smp ones need _sleeping and _stopped. Both can be patched to be part of the public API.

@xemul
Copy link
Contributor Author

xemul commented Jun 18, 2024

CI -- #2296

@avikivity
Copy link
Member

The alien and smp ones need _sleeping and _stopped. Both can be patched to be part of the public API.

Why should they be part of the public API? We don't want people to rely on them without a good reason.

@xemul
Copy link
Contributor Author

xemul commented Jun 18, 2024

The _sleeping doesn't become such, I just move it to existing .wakeup() one. I would be better to hide the latter in internal API indeed, but that's separate task.

The _stopped ... yes, it appears to be a new method, but it's const and lightweight. So maybe it's OK until we hide it together with the wakeup()?

There are two of them, both check reactor::_sleeping before calling its
wakeup() method. The check can be made the part of the wakeup() itself.

Signed-off-by: Pavel Emelyanov <[email protected]>
To facilitate next patch.

Signed-off-by: Pavel Emelyanov <[email protected]>
Both used to mess with _sleeping and _stopped bits. Now both are gone,
and queues can enjoy the public reactor API only.

Signed-off-by: Pavel Emelyanov <[email protected]>
@xemul xemul force-pushed the br-reactor-smp-queues-unfriend branch from 5f0190b to 66b826f Compare June 18, 2024 14:58
@xemul
Copy link
Contributor Author

xemul commented Jun 18, 2024

upd:

  • marked the new reactor::stopped() with /// @private not to appear in docs
  • rebased to pick up CI fix

@xemul
Copy link
Contributor Author

xemul commented Jun 27, 2024

The _sleeping doesn't become such, I just move it to existing .wakeup() one. I would be better to hide the latter in internal API indeed, but that's separate task.

The _stopped ... yes, it appears to be a new method, but it's const and lightweight. So maybe it's OK until we hide it together with the wakeup()?

@avikivity , does this justify the change from you perspective?

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.

None yet

2 participants