while studying the parity code
https://github.com/paritytech/parity/blob/master/stratum/src/traits.rs
here is the relevant extract
pub trait JobDispatcher: Send + Sync {
// json for initial client handshake
fn initial(&self) -> Option<String> { None }
// json for difficulty dispatch
fn difficulty(&self) -> Option<String> { None }
// json for job update given worker_id (payload manager should split job!)
fn job(&self) -> Option<String> { None }
// miner job result
fn submit(&self, payload: Vec<String>) -> Result<(), Error>;
}
Please see how the JobDispatcher is bound through 'Send' and 'Sync'.
Very impressive !
warm regards
Saifi.