File tree Expand file tree Collapse file tree 4 files changed +473
-224
lines changed
Expand file tree Collapse file tree 4 files changed +473
-224
lines changed Original file line number Diff line number Diff line change @@ -83,19 +83,19 @@ where
8383pub use forte:: Scope ;
8484
8585#[ inline( always) ]
86- pub fn scope < ' scope , OP , R > ( op : OP ) -> R
86+ pub fn scope < OP , R > ( op : OP ) -> Option < R >
8787where
88- OP : FnOnce ( & Scope < ' scope > ) -> R + Send ,
88+ OP : for < ' scope > FnOnce ( & ' scope Scope < ' scope , ' _ > ) -> R + Send ,
8989 R : Send ,
9090{
9191 ensure_started ( ) ;
9292 forte:: scope ( op)
9393}
9494
9595#[ inline( always) ]
96- pub fn in_place_scope < ' scope , OP , R > ( op : OP ) -> R
96+ pub fn in_place_scope < OP , R > ( op : OP ) -> Option < R >
9797where
98- OP : FnOnce ( & Scope < ' scope > ) -> R ,
98+ OP : for < ' scope > FnOnce ( & ' scope Scope < ' scope , ' _ > ) -> R ,
9999{
100100 ensure_started ( ) ;
101101 forte:: scope ( op)
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ mod platform {
7373 pub use alloc:: sync:: Arc ;
7474 pub use alloc:: sync:: Weak ;
7575 pub use core:: sync:: atomic:: AtomicBool ;
76+ pub use core:: sync:: atomic:: AtomicPtr ;
7677 pub use core:: sync:: atomic:: AtomicU32 ;
7778 pub use core:: sync:: atomic:: Ordering ;
7879 pub use std:: sync:: Barrier ;
@@ -95,6 +96,7 @@ mod platform {
9596 pub use shuttle:: sync:: Mutex ;
9697 pub use shuttle:: sync:: Weak ;
9798 pub use shuttle:: sync:: atomic:: AtomicBool ;
99+ pub use shuttle:: sync:: atomic:: AtomicPtr ;
98100 pub use shuttle:: sync:: atomic:: AtomicU32 ;
99101 pub use shuttle:: sync:: atomic:: Ordering ;
100102 pub use shuttle:: thread:: Builder as ThreadBuilder ;
You can’t perform that action at this time.
0 commit comments