From 4b9ec32b9ff686dd2accde7a9dafe865a4d7a189 Mon Sep 17 00:00:00 2001 From: ThePuzzlemaker Date: Sun, 17 Jan 2021 18:26:31 -0600 Subject: [PATCH] Remove TODO --- src/arc-drop.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arc-drop.md b/src/arc-drop.md index be65754..0b3cfe5 100644 --- a/src/arc-drop.md +++ b/src/arc-drop.md @@ -22,12 +22,11 @@ also return if the returned value from `fetch_sub` (the value of the reference count before decrementing it) is not equal to `1` (which happens when we are not the last reference to the data). ```rust,ignore -if inner.rc.fetch_sub(1, Ordering::???) != 1 { +if inner.rc.fetch_sub(1, Ordering::Relaxed) != 1 { return; } ``` -TODO We then need to create an atomic fence to prevent reordering of the use of the data and deletion of the data. As described in [the standard library's implementation of `Arc`][3]: