def __init__(self, handover_dict, handover_cond):
"""
Parameters:
handover_dict (dict): Dictionary for handing over the notification
header and message from this listener thread to the receiver
thread. Must initially be an empty dictionary.
handover_cond (threading.Condition): Condition object for handing
over the notification from this listener thread to the receiver
thread. Must initially be a new threading.Condition object.
"""
# Sync variables for thread-safe handover between listener thread and
# receiver thread:
self._handover_dict = handover_dict # keys: headers, message
self._handover_cond = handover_cond
# Wait timeout to honor keyboard interrupts after this time:
self._wait_timeout = 10.0 # seconds
评论列表
文章目录