Avoid circular reference

it clogs pickling and garbage-collecting
This commit is contained in:
Gouvernathor 2023-11-15 23:46:46 +01:00
parent 884c264f04
commit 42f690f966
1 changed files with 4 additions and 2 deletions

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