You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im very new to rust, so my question/sample code might be weird.
Im trying to build a small rest api with actix, where I stream large result sets back to client
But atm when I loop resultset with next it will pretty much block the thread for any new request ( I will only have 1 thread)
Since I use .fetch_array_size(100).prefetch_rows(100) it would be useful if each request only worked with 100 rows then let other requests do little work etc. In this way I could stream back result to many clients, just a little slower..
Im very new to rust, so my question/sample code might be weird.
Im trying to build a small rest api with actix, where I stream large result sets back to client
But atm when I loop resultset with next it will pretty much block the thread for any new request ( I will only have 1 thread)
Since I use
.fetch_array_size(100).prefetch_rows(100)
it would be useful if each request only worked with 100 rows then let other requests do little work etc. In this way I could stream back result to many clients, just a little slower..Tried to wrap
rows.next()
in async, but its still blocking. (at least I tried...:joy:)https://github.com/vegarringdal/rust/blob/try_async/apitest/src/main.rs#L26-L30
Is what Im trying to do possible ?
The text was updated successfully, but these errors were encountered: