Merge pull request #133 from mitchmindtree/tryfix-osx

Do not lock inner twice. Fixes bug in osx futures 0.1.1 update.
This commit is contained in:
tomaka 2016-10-01 10:23:31 +02:00 committed by GitHub
commit 2d75e2eaf5
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ impl Stream for SamplesStream {
let current_callback = match inner.current_callback.take() { let current_callback = match inner.current_callback.take() {
Some(c) => c, Some(c) => c,
None => { None => {
self.inner.lock().unwrap().scheduled_task = Some(task::park()); inner.scheduled_task = Some(task::park());
return Ok(Async::NotReady); return Ok(Async::NotReady);
} }
}; };