Skip to content

Commit

Permalink
Implement Send for chunk types
Browse files Browse the repository at this point in the history
  • Loading branch information
RamType0 committed Jan 17, 2022
1 parent 66fa288 commit 2064a09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ pub struct WriteChunkUninit<'a, T> {
producer: &'a Producer<T>,
}

unsafe impl<T: Send> Send for WriteChunkUninit<'_, T> {}

impl<T> WriteChunkUninit<'_, T> {
/// Returns two slices for writing to the requested slots.
///
Expand Down Expand Up @@ -614,6 +616,8 @@ pub struct ReadChunk<'a, T> {
consumer: &'a mut Consumer<T>,
}

unsafe impl<T: Send> Send for ReadChunk<'_, T> {}

impl<T> ReadChunk<'_, T> {
/// Returns two slices for reading from the requested slots.
///
Expand Down

0 comments on commit 2064a09

Please sign in to comment.