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

Is IAsyncStreamWriter.WriteAsync thread safe? #2607

Closed
catamounttechnology opened this issue Mar 3, 2025 · 1 comment
Closed

Is IAsyncStreamWriter.WriteAsync thread safe? #2607

catamounttechnology opened this issue Mar 3, 2025 · 1 comment
Labels
question Further information is requested

Comments

@catamounttechnology
Copy link

  1. Can IAsyncStreamWriter.WriteAsync be called from different threads?
  2. If message ordering is not important, can it be called multiple times without awaiting every call?
@catamounttechnology catamounttechnology added the question Further information is requested label Mar 3, 2025
@JamesNK
Copy link
Member

JamesNK commented Mar 11, 2025

  1. Can IAsyncStreamWriter.WriteAsync be called from different threads?

Yes, but only one call at a time. And also only if the request is still in progress.

  1. If message ordering is not important, can it be called multiple times without awaiting every call?

No.

@JamesNK JamesNK closed this as completed Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants