Skip to content

Commit d5060f7

Browse files
committed
Add register_unbound in _crossinterp.py and initialize it in _queues.py
1 parent 726e8e8 commit d5060f7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/concurrent/interpreters/_crossinterp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ def __repr__(self):
8282
for k, v in _UNBOUND_CONSTANT_TO_FLAG.items()}
8383

8484

85+
def register_unbound(unbound, flag):
86+
_UNBOUND_CONSTANT_TO_FLAG[unbound] = flag
87+
88+
8589
def serialize_unbound(unbound):
8690
op = unbound
8791
try:

Lib/concurrent/interpreters/_queues.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class ItemInterpreterDestroyed(QueueError,
4747

4848

4949
UNBOUND = _crossinterp.UnboundItem.singleton('queue', __name__)
50+
_crossinterp.register_unbound(UNBOUND, 3)
5051

5152

5253
def _serialize_unbound(unbound):

0 commit comments

Comments
 (0)