Skip to content

Operator concurrency #5401

Answered by Xuanwo
dr3s asked this question in Q&A
Dec 6, 2024 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

Thank you for sharing the code. We don't have internal locks for b2, so it shouldn't be related to the operator.

I have two questions:

  • It seems image handling is CPU-intensive work. How long will it take? If it takes more than 20ms, it's better to move it outside the async function block to avoid blocking the entire async runtime. Please try using spawn_blocking instead.
  • How does upload_image been used outside?

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Xuanwo
Comment options

Xuanwo Dec 6, 2024
Collaborator

Answer selected by Xuanwo
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants