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

Single threaded server example with async_trait(?Send) #2171

Open
cavemanloverboy opened this issue Feb 1, 2025 · 2 comments
Open

Single threaded server example with async_trait(?Send) #2171

cavemanloverboy opened this issue Feb 1, 2025 · 2 comments

Comments

@cavemanloverboy
Copy link

cavemanloverboy commented Feb 1, 2025

There are zero examples of anything using #[tonic::async_trait(?Send)]. Can we fix this?

I'm having trouble trying to build a single-threaded server using tokio's current_thread runtime because the autogenerated traits for the service have Send + Sync

@harry0349
Copy link

harry0349 commented Feb 10, 2025

It seems that the single-threaded server is not implemented.

pub trait #server_trait : std::marker::Send + std::marker::Sync + 'static {

@Eclextic
Copy link

Eclextic commented Mar 4, 2025

I also am interested. Using tonic is so horrible when you want to use a different async framework like monoio that doesn't require Send.

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

No branches or pull requests

3 participants