Skip to content
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
close_all -> release_all
  • Loading branch information
ericsnowcurrently committed Oct 17, 2023
commit 2e0fc2ac837b1c5c370a4a1840d217c3ef3f6ec9
8 changes: 4 additions & 4 deletions Modules/_xxinterpchannelsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ _channelends_release_interpreter(_channelends *ends, int64_t interpid)
}

static void
_channelends_close_all(_channelends *ends, int which, int force)
_channelends_release_all(_channelends *ends, int which, int force)
{
// XXX Handle the ends.
// XXX Handle force is True.
Expand Down Expand Up @@ -1340,7 +1340,7 @@ _channel_release_interpreter(_PyChannelState *chan, int64_t interpid)
}

static int
_channel_close_all(_PyChannelState *chan, int end, int force)
_channel_release_all(_PyChannelState *chan, int end, int force)
{
int res = -1;
PyThread_acquire_lock(chan->mutex, WAIT_LOCK);
Expand All @@ -1359,7 +1359,7 @@ _channel_close_all(_PyChannelState *chan, int end, int force)

// We *could* also just leave these in place, since we've marked
// the channel as closed already.
_channelends_close_all(chan->ends, end, force);
_channelends_release_all(chan->ends, end, force);

res = 0;
done:
Expand Down Expand Up @@ -1565,7 +1565,7 @@ _channels_close(_channels *channels, int64_t cid, _PyChannelState **pchan,
goto done;
}
else {
int err = _channel_close_all(ref->chan, end, force);
int err = _channel_release_all(ref->chan, end, force);
if (err != 0) {
if (end == CHANNEL_SEND && err == ERR_CHANNEL_NOT_EMPTY) {
if (ref->chan->closing != NULL) {
Expand Down