Skip to content

grpc: Fix long-running non-streaming methods blocking the whole server

vlorentz requested to merge grpc-blocking into master

These methods spend a long time in a non-async visitor, causing the whole server to be blocked, because they run in a thread shared with the main loop (which also accepts connections). Running them in spawn_blocking tells the executor to run the visitor in its own thread and yield execution back to the main loop until that thread completes.

The Traverse method was not affected because it already runs in a separate thread in order to stream results

Resolves #4800 (closed).

Merge request reports