Skip to content

Commit

Permalink
ipc: Make assuan::Client Send and Sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
teythoon committed Jul 16, 2021
1 parent 6727420 commit 7bde618
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ipc/src/assuan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ pub struct Client {
done: bool,
w: WriteState,
}
assert_send_and_sync!(Client);

enum WriteState {
Ready(WriteHalf<IpcStream>),
Sending(Pin<Box<dyn Future<Output = Result<WriteHalf<IpcStream>, anyhow::Error>>>>),
Sending(Pin<Box<dyn Future<Output = Result<WriteHalf<IpcStream>,
anyhow::Error>> + Send + Sync>>),
Transitioning,
Dead,
}
assert_send_and_sync!(WriteState);

impl Client {
/// Connects to the server.
Expand Down

0 comments on commit 7bde618

Please sign in to comment.