From a207dfcbea22075852971d1430044c5cfcd2e850 Mon Sep 17 00:00:00 2001 From: Ken Jin Date: Wed, 10 Jul 2024 21:33:46 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ralf Gommers --- docs/porting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/porting.md b/docs/porting.md index 086ccea..1d1dfdd 100644 --- a/docs/porting.md +++ b/docs/porting.md @@ -355,7 +355,7 @@ library. ### Dealing with thread-unsafe objects -Similar to the section above, objects may need locking or atomics they can +Similar to the section above, objects may need locking or atomics if they can be concurrently modified from multiple threads. CPython 3.13 exposes a public C API that allows users to use the built-in per-object locks. @@ -378,8 +378,8 @@ int do_modification(MyObject *obj) { } ``` -A variant for locking 2 objects at once is also available. For more information -about `Py_BEGIN_CRITICAL_SECTION`, please the the +A variant for locking two objects at once is also available. For more information +about `Py_BEGIN_CRITICAL_SECTION`, please see the [Python C API documentation on critical sections](https://docs.python.org/3.13/c-api/init.html#python-critical-section-api).