Skip to content

Commit 34ca3d4

Browse files
Make interpreters.*Channel shareable again.
1 parent 8916c70 commit 34ca3d4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Lib/test/support/interpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,4 @@ def close(self):
264264

265265

266266
# XXX This is causing leaks (gh-110318):
267-
#_channels._register_end_types(SendChannel, RecvChannel)
267+
_channels._register_end_types(SendChannel, RecvChannel)

Lib/test/test_interpreters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,6 @@ def test_list_all(self):
833833
after = set(interpreters.list_all_channels())
834834
self.assertEqual(after, created)
835835

836-
@unittest.expectedFailure # See gh-110318:
837836
def test_shareable(self):
838837
rch, sch = interpreters.create_channel()
839838

Modules/_xxinterpchannelsmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ _get_current_module_state(void)
434434
static int
435435
traverse_module_state(module_state *state, visitproc visit, void *arg)
436436
{
437+
/* external types */
438+
Py_VISIT(state->send_channel_type);
439+
Py_VISIT(state->recv_channel_type);
440+
437441
/* heap types */
438442
Py_VISIT(state->ChannelInfoType);
439443
Py_VISIT(state->ChannelIDType);

0 commit comments

Comments
 (0)
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