This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree 1 file changed +6
-6
lines changed
unified-scheduler-logic/src
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -225,13 +225,13 @@ mod utils {
225
225
}
226
226
}
227
227
228
- // Safety: Access to `TokenCell` is assumed to be only from a single thread by proper use of
229
- // Token once after `TokenCell` is sent to the thread from other threads; So, both implementing
230
- // Send and Sync can be thought as safe.
228
+ // Safety: Once after a (`Send`-able) `TokenCell` is transferred to a thread from other
229
+ // threads, access to `TokenCell` is assumed to be only from the single thread by proper use of
230
+ // Token. Thereby, implementing `Sync` can be thought as safe and doing so is needed for the
231
+ // particular implementation pattern in the unified scheduler (multi-threaded off-loading).
231
232
//
232
- // In other words, TokenCell is technically still `!Send` and `!Sync`. But there should be no
233
- // legalized usage which depends on real `Send` and `Sync` to avoid undefined behaviors.
234
- unsafe impl < V > Send for TokenCell < V > { }
233
+ // In other words, TokenCell is technically still `!Sync`. But there should be no
234
+ // legalized usage which depends on real `Sync` to avoid undefined behaviors.
235
235
unsafe impl < V > Sync for TokenCell < V > { }
236
236
237
237
/// A auxiliary zero-sized type to enforce aliasing rule to [`TokenCell`] via rust type system
You can’t perform that action at this time.
0 commit comments