File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -229,8 +229,13 @@ impl<T: Element> PyBuffer<T> {
229229
230230 /// Gets the pointer to the start of the buffer memory.
231231 ///
232- /// Warning: the buffer memory might be mutated by other Python functions,
233- /// and thus may only be accessed while the GIL is held.
232+ /// Warning: the buffer memory can be mutated by other code (including
233+ /// other Python functions, if the GIL is released, or other extension
234+ /// modules even if the GIL is held). You must either access memory
235+ /// atomically, or ensure there are no data races yourself. See
236+ /// [this blog post] for more details.
237+ ///
238+ /// [this blog post]: https://alexgaynor.net/2022/oct/23/buffers-on-the-edge/
234239 #[ inline]
235240 pub fn buf_ptr ( & self ) -> * mut c_void {
236241 self . 0 . buf
You can’t perform that action at this time.
0 commit comments