The std::io::Error type is Send but it's not Sync. This is because of the use of Box<Error+Send>, as that value is not Sync, and so therefore io::Error is not Sync.
This is a problem for me as I want to stuff an io::Error into a sync::Arc and have the resulting value be Send, but Arc is only Send if its element type is Send + Sync.
/cc @alexcrichton
The
std::io::Errortype isSendbut it's notSync. This is because of the use ofBox<Error+Send>, as that value is notSync, and so thereforeio::Erroris notSync.This is a problem for me as I want to stuff an
io::Errorinto async::Arcand have the resulting value beSend, butArcis onlySendif its element type isSend + Sync./cc @alexcrichton