Avoid circular reference

it clogs pickling and garbage-collecting

(cherry picked from commit 42f690f966)
This commit is contained in:
Gouvernathor 2023-11-15 23:46:46 +01:00 committed by LoafyLemon
parent fe5a7402a9
commit ff49d9fa95

View File

@ -1,4 +1,3 @@
init python:
class Parcel(object):
"""
@ -18,7 +17,10 @@ init python:
self.wait = wait
self.label = label
self.func = func
self.queue = mailbox.parcels
@property
def queue(self):
return mailbox.parcels
def send(self):
self.mailed = True