crypto: shared agent stream
The Mutex within AgentSigner did not seem to make sense. The Mutex could
never be shared, since the structs could never be cloned.
It would make more sense to have an Arc<Mutex<AgentClient<Stream>>> within
Agent, which could then be shared and cloned when constructing the
AgentSigner.
The Mutex within AgentSigner did not seem to make sense. The Mutex could
never be shared, since the structs could never be cloned.
It would make more sense to have an Arc<Mutex<AgentClient<Stream>>> within
Agent, which could then be shared and cloned when constructing the
AgentSigner.
Here’s a version that uses RefCell instead of Mutex. This required dropping Sync from Signer (which would indeed require Mutex).
Rebase.