mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
fix: 错误的互斥锁重置逻辑
This commit is contained in:
parent
5c516dc2a1
commit
2930455249
|
@ -94,10 +94,12 @@ class Session:
|
|||
|
||||
# 加锁
|
||||
def acquire_response_lock(self):
|
||||
logging.debug('{},lock acquire,{}'.format(self.name, self.response_lock))
|
||||
self.response_lock.acquire()
|
||||
|
||||
# 释放锁
|
||||
def release_response_lock(self):
|
||||
logging.debug('{},lock release,{}'.format(self.name, self.response_lock))
|
||||
self.response_lock.release()
|
||||
|
||||
def __init__(self, name: str):
|
||||
|
@ -214,7 +216,7 @@ class Session:
|
|||
self.last_interact_timestamp = int(time.time())
|
||||
self.just_switched_to_exist_session = False
|
||||
|
||||
self.response_lock = threading.Lock()
|
||||
# self.response_lock = threading.Lock()
|
||||
|
||||
if schedule_new:
|
||||
self.schedule()
|
||||
|
|
Loading…
Reference in New Issue
Block a user