-
SummaryHey fellow axumates. I'm working on a project at https://git.sr.ht/~latex/streamlist
Preferably I don't want to use yet another thread just for xrust. Is it even possible to make the middleware non-Send? Does axum even support that or not? What about actix-web? axum version0.7.7 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Using a non- If you don't need to hold the |
Beta Was this translation helpful? Give feedback.
Using a non-
Sendtype inside of anasync fndoes not automatically make its future type non-Send. That only happens when you declare a binding of such a type before the last.awaitpoint (roughly speaking).If you don't need to hold the
RNodeacross a.awaitpoint, the best solution is probably to move all thexrustlogic into a regularfnthat is called by yourasync fn. I took a brief look at your code and think this should work there.