Skip to content

Commit 1b8f79a

Browse files
committed
fix ToScopeHandle for ScopeBase
1 parent d33721d commit 1b8f79a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rayon-core/src/scope/internal.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![cfg(rayon_unstable)]
22

3-
use super::Scope;
3+
use super::{Scope, ScopeBase};
44
use internal::task::{ScopeHandle, Task, ToScopeHandle};
55
use std::any::Any;
66
use std::mem;
@@ -16,16 +16,16 @@ impl<'scope> ToScopeHandle<'scope> for Scope<'scope> {
1616

1717
#[derive(Debug)]
1818
pub struct LocalScopeHandle<'scope> {
19-
scope: *const Scope<'scope>,
19+
scope: *const ScopeBase<'scope>,
2020
}
2121

2222
impl<'scope> LocalScopeHandle<'scope> {
2323
/// Caller guarantees that `*scope` will remain valid
2424
/// until the scope completes. Since we acquire a ref,
2525
/// that means it will remain valid until we release it.
2626
unsafe fn new(scope: &Scope<'scope>) -> Self {
27-
scope.job_completed_latch.increment();
28-
LocalScopeHandle { scope: scope }
27+
scope.base.increment();
28+
LocalScopeHandle { scope: &scope.base }
2929
}
3030
}
3131

0 commit comments

Comments
 (0)