fn make_engine_cb(cid: u64, pr: ProcessResult, ch: SyncSendCh<Msg>) -> EngineCallback<()> {
    Box::new(move |(cb_ctx, result)| {
        match ch.send(Msg::WriteFinished {
            cid: cid,
            pr: pr,
            cb_ctx: cb_ctx,
            result: result,
        }) {
            Ok(_) => {}
            e @ Err(TransportError::Closed) => info!("channel closed, err {:?}", e),
            Err(e) => {
                panic!(
                    "send write finished to scheduler failed cid={}, err:{:?}",
                    cid,
                    e
                );
            }
        }
    })
}
/// Creates a callback to receive async results of write prepare from the storage engine.
Creates a callback to receive async results of write prepare from the storage engine.
Creates a callback to receive async results of write prepare from the storage engine .
fn make_engine_cb(cid: u64, pr: ProcessResult, ch: SyncSendCh<Msg>) -> EngineCallback<()> {
    Box::new(move |(cb_ctx, result)| {
        match ch.send(Msg::WriteFinished {
            cid: cid,
            pr: pr,
            cb_ctx: cb_ctx,
            result: result,
        }) {
            Ok(_) => {}
            e @ Err(TransportError::Closed) => info!("channel closed, err {:?}", e),
            Err(e) => {
                panic!(
                    "send write finished to scheduler failed cid={}, err:{:?}",
                    cid,
                    e
                );
            }
        }
    })
}
fn make_engine_cb ( cid : u64 , pr : ProcessResult , ch : SyncSendCh < Msg > ) -> EngineCallback < ( ) > { Box :: new ( move | ( cb_ctx , result ) | { match ch . send ( Msg :: WriteFinished { cid : cid , pr : pr , cb_ctx : cb_ctx , result : result , } ) { Ok ( _ ) => { } e @ Err ( TransportError :: Closed ) => info ! ( " " e ) , Err ( e ) => { panic ! ( " " cid e ) ; } } } ) }
Creates a callback to receive async results of write prepare from the storage engine.
Creates a callback to receive async results of write prepare from the storage engine .
cid
u64
pr
ProcessResult
ch
SyncSendCh<Msg>
cid
u64
pr
ProcessResult
ch
SyncSendCh<Msg>