Skip to content

gh-76785: Clean Up the Channels Module #110568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use typedefs.
  • Loading branch information
ericsnowcurrently committed Oct 17, 2023
commit bdb450ecf9c0dd00d24c3abfb855cf6b34717898
12 changes: 6 additions & 6 deletions Modules/_xxinterpchannelsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ _channels_add(_channels *channels, _PyChannelState *chan)
}

/* forward */
static int _channel_set_closing(struct _channelref *, PyThread_type_lock);
static int _channel_set_closing(_channelref *, PyThread_type_lock);

static int
_channels_close(_channels *channels, int64_t cid, _PyChannelState **pchan,
Expand Down Expand Up @@ -1736,12 +1736,12 @@ _channels_clear_interpreter(_channels *channels, int64_t interpid)
/* support for closing non-empty channels */

struct _channel_closing {
struct _channelref *ref;
_channelref *ref;
};

static int
_channel_set_closing(struct _channelref *ref, PyThread_type_lock mutex) {
struct _channel *chan = ref->chan;
_channel_set_closing(_channelref *ref, PyThread_type_lock mutex) {
_PyChannelState *chan = ref->chan;
if (chan == NULL) {
// already closed
return 0;
Expand All @@ -1765,7 +1765,7 @@ _channel_set_closing(struct _channelref *ref, PyThread_type_lock mutex) {
}

static void
_channel_clear_closing(struct _channel *chan) {
_channel_clear_closing(_PyChannelState *chan) {
PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
if (chan->closing != NULL) {
GLOBAL_FREE(chan->closing);
Expand All @@ -1775,7 +1775,7 @@ _channel_clear_closing(struct _channel *chan) {
}

static void
_channel_finish_closing(struct _channel *chan) {
_channel_finish_closing(_PyChannelState *chan) {
struct _channel_closing *closing = chan->closing;
if (closing == NULL) {
return;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy