From 1783c25c464db6b5c84980ef03e5dc225575e948 Mon Sep 17 00:00:00 2001 From: edef Date: Fri, 16 Sep 2016 05:11:10 -0400 Subject: [PATCH] Implement Send for Generator --- src/generator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/generator.rs b/src/generator.rs index 025fbe6..e1ada62 100644 --- a/src/generator.rs +++ b/src/generator.rs @@ -88,6 +88,9 @@ pub struct Generator<'a, Input: Send + 'a, Output: Send + 'a, Stack: stack::Stac phantom: PhantomData<(&'a (), *mut Input, *const Output)> } +unsafe impl<'a, Input, Output, Stack> Send for Generator<'a, Input, Output, Stack> + where Input: Send + 'a, Output: Send + 'a, Stack: stack::Stack + Send {} + impl<'a, Input, Output, Stack> Generator<'a, Input, Output, Stack> where Input: Send + 'a, Output: Send + 'a, Stack: stack::Stack { /// Creates a new generator.