Update src/send-and-sync.md

Co-authored-by: Yuki Okushi <jtitor@2k36.org>
pull/259/head
Daniel Franklin 4 years ago committed by GitHub
parent 047dc6bcf1
commit 64957019c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -214,7 +214,7 @@ sort of Box would be Send, which in this case is the same as saying T is Send.
unsafe impl<T> Send for Carton<T> where Box<T>: Send {} unsafe impl<T> Send for Carton<T> where Box<T>: Send {}
``` ```
Right now Carton<T> has a memory leak, as it never frees the memory it allocates. Right now `Carton<T>` has a memory leak, as it never frees the memory it allocates.
Once we fix that we have a new requirement we have to ensure we meet to be Send: Once we fix that we have a new requirement we have to ensure we meet to be Send:
we need to know `free` can be called on a pointer that was yielded by an we need to know `free` can be called on a pointer that was yielded by an
allocation done on another thread. We can check this is true in the docs for allocation done on another thread. We can check this is true in the docs for

Loading…
Cancel
Save