Skip to content

socket module should use PyMutex instead of Lock #150452

Description

@KowalskiThomas

Issue

This is a follow-up from #150406 where @kumaraditya303 pointed out that the existing Lock allocated here...

cpython/Modules/socketmodule.c

Lines 9294 to 9296 in a189e3d

#if defined(USE_GETHOSTBYNAME_LOCK)
netdb_lock = PyThread_allocate_lock();
#endif

... should be replaced with a PyMutex.

Linked PRs

Activity

  1. added a commit that references this issue on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulestype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions