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.
--
https://meetup.com/rustox
---
You received this message because you are subscribed to the Google Groups "Rust
Bangalore Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rustox.
To view this discussion on the web visit
https://groups.google.com/d/msgid/rustox/20170821202630.16185.qmail%40server322.com.
For more options, visit https://groups.google.com/d/optout.