-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
My setup is:
interface CommandContext {
data @0 () -> (data: Data);
}
interface CommandFactory {
init @0 (name: Text, nd: Data) -> (cmd: CommandTrait);
allAvailables @1 () -> (availables: Data);
}
interface CommandTrait {
run @0 (ctx: CommandContext, inputs: Data) -> (output: Data);
}
I have 1 or more CommandFactory
clients, calling them to initialize commands on remote servers. because capnp-rpc clients are not Send
, I cannot send the clients to another thread, the CommandFactory
and CommandTrait
clients all need to stay in the same thread, so either:
- the entire app need to be rewritten using tokio LocalSet and
current_thread
tokio runtime - I have to keep all capnp-rpc types in a separate tokio runtime, and communicate with them via channels
This seems like a huge limitation, am I missing something? Is there any workaround?
sondrelgandrewbanchich, chaserileyroberts and Stumblinbear
Metadata
Metadata
Assignees
Labels
No labels