防止多线程数据交叉

This commit is contained in:
binary-husky 2023-10-31 18:02:14 +08:00
parent 136162ec0d
commit 17cf47dcd6

View File

@ -134,6 +134,8 @@ class LocalLLMHandle(Process):
if self.info == "`准备就绪`":
yield "`正在等待线程锁,排队中请稍后 ...`"
with self.threadLock:
if self.parent.poll():
while self.parent.poll(): self.parent.recv()
self.parent.send(kwargs)
std_out = ""
std_out_clip_len = 4096