| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The dbm_* functions are not thread-safe, naturally. Add critical sections to protect their use.
There was a problem hiding this comment.
In general, it's easier to add lock_held variations of functions instead of adding inline critical sections with goto. For example:
static int
dbm_something_lock_held(PyObject *self)
{
/* ... */
}
static int
dbm_something(PyObject *self)
{
int result;
Py_BEGIN_CRITICAL_SECTION(self);
result = dbm_something_lock_held(self);
Py_END_CRITICAL_SECTION();
return result;
}Would you mind switching over to that pattern here?
Sorry, something went wrong.
For sure, that would be much more robust, thanks! |
Sorry, something went wrong.
…ction instead of using gotos everywhere.
|
Sorry for the delay, I will review during the PyCon sprint. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM as well
Sorry, something went wrong.
Sorry, something went wrong.
|
Oh it's not relatede to dbms. |
Sorry, something went wrong.
) (cherry picked from commit ffaeb3d) Co-authored-by: Duane Griffin <duaneg@dghda.com>
|
GH-139996 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The dbm_* functions are not thread-safe, naturally. Add critical sections to protect their use.