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
If I understand correctly - Hyper creates a new instance of a server for each user request.
More than that, it can pass a server generator to other threads that may work with individual user connections.
So we need a make_service_fn that creates an asynchronous server generator used by different threads, and a service_fn function that is used by a thread to generate a server instance to serve each user request (serve is also async).
In order to deal with the Rust borrow checker we need to clone the server 3 times:
If I understand correctly - Hyper creates a new instance of a server for each user request.
More than that, it can pass a server generator to other threads that may work with individual user connections.
So we need a
make_service_fn
that creates an asynchronous server generator used by different threads, and aservice_fn
function that is used by a thread to generate a server instance toserve
each user request (serve
is alsoasync
).In order to deal with the Rust borrow checker we need to
clone
theserver
3 times:oak/oak/server/rust/oak_runtime/src/node/grpc_server.rs
Lines 314 to 323 in 1d0e436
Based on the Slack thread.
The text was updated successfully, but these errors were encountered: