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

Make DisposalThread reachable #235

Merged
merged 4 commits into from
Mar 30, 2024
Merged

Conversation

AlvaroMS25
Copy link
Contributor

The Config object provided to Calls and Drivers allows setting a DisposalThread, but since it is unreachable from outside the crate, the only way to properly set it is using a Songbird instance, which may not be adequate for all use cases. This PR just makes DisposalThread reachable from the outside.

Copy link
Member

@FelixMcFelix FelixMcFelix left a comment

Choose a reason for hiding this comment

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

The idea of this makes sense (easier to manage disposal thread to driver ratio in non-gateway use cases). However, I think you've made a lot more public than you intended, which is why the docs lint is flagging up. Would this work instead as a pub use tasks::disposal::DisposalThread; in src/driver/mod.rs?

@AlvaroMS25
Copy link
Contributor Author

I'm sorry about that, i didn't realize how much i was making public with that. You're right, just doing a pub use would be enough. I'll update this PR in a sec

@FelixMcFelix FelixMcFelix merged commit 1d5b259 into serenity-rs:current Mar 30, 2024
11 checks passed
@FelixMcFelix
Copy link
Member

Fantastic, thanks very much!

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