File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,6 +165,8 @@ impl Future {
165165 /// Registers a callback to be called upon completion of this future. If the future has already
166166 /// completed, the callback will be called immediately.
167167 ///
168+ /// Note that callbacks *must not* reenter this [`Future`] or the corresponding [`Notifier`].
169+ ///
168170 /// This is not exported to bindings users, use the bindings-only `register_callback_fn` instead
169171 pub fn register_callback ( & self , callback : Box < dyn FutureCallback > ) {
170172 let mut state = self . state . lock ( ) . unwrap ( ) ;
@@ -182,6 +184,8 @@ impl Future {
182184 // here.
183185 /// Registers a callback to be called upon completion of this future. If the future has already
184186 /// completed, the callback will be called immediately.
187+ ///
188+ /// Note that callbacks *must not* reenter this [`Future`] or the corresponding [`Notifier`].
185189 #[ cfg( c_bindings) ]
186190 pub fn register_callback_fn < F : ' static + FutureCallback > ( & self , callback : F ) {
187191 self . register_callback ( Box :: new ( callback) ) ;
You can’t perform that action at this time.
0 commit comments