File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -319,11 +319,14 @@ impl<T: ?Sized> Arc<T> {
319
319
320
320
/// Gets the number of [`Weak`][weak] pointers to this value.
321
321
///
322
- /// Be careful how you use this information, because another thread
323
- /// may change the weak count at any time.
324
- ///
325
322
/// [weak]: struct.Weak.html
326
323
///
324
+ /// # Safety
325
+ ///
326
+ /// This method by itself is safe, but using it correctly requires extra care.
327
+ /// Another thread can change the weak count at any time,
328
+ /// including potentially between calling this method and acting on the result.
329
+ ///
327
330
/// # Examples
328
331
///
329
332
/// ```
@@ -347,8 +350,11 @@ impl<T: ?Sized> Arc<T> {
347
350
348
351
/// Gets the number of strong (`Arc`) pointers to this value.
349
352
///
350
- /// Be careful how you use this information, because another thread
351
- /// may change the strong count at any time.
353
+ /// # Safety
354
+ ///
355
+ /// This method by itself is safe, but using it correctly requires extra care.
356
+ /// Another thread can change the strong count at any time,
357
+ /// including potentially between calling this method and acting on the result.
352
358
///
353
359
/// # Examples
354
360
///
You can’t perform that action at this time.
0 commit comments