mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
fix deadlock
This commit is contained in:
parent
48a2e1a353
commit
473e773aea
|
@ -154,7 +154,8 @@ class ThumbSrv(object):
|
||||||
histpath = self.asrv.vfs.histtab[ptop]
|
histpath = self.asrv.vfs.histtab[ptop]
|
||||||
tpath = thumb_path(histpath, rem, mtime, fmt)
|
tpath = thumb_path(histpath, rem, mtime, fmt)
|
||||||
abspath = os.path.join(ptop, rem)
|
abspath = os.path.join(ptop, rem)
|
||||||
cond = threading.Condition()
|
cond = threading.Condition(self.mutex)
|
||||||
|
do_conv = False
|
||||||
with self.mutex:
|
with self.mutex:
|
||||||
try:
|
try:
|
||||||
self.busy[tpath].append(cond)
|
self.busy[tpath].append(cond)
|
||||||
|
@ -172,8 +173,11 @@ class ThumbSrv(object):
|
||||||
f.write(fsenc(os.path.dirname(abspath)))
|
f.write(fsenc(os.path.dirname(abspath)))
|
||||||
|
|
||||||
self.busy[tpath] = [cond]
|
self.busy[tpath] = [cond]
|
||||||
self.q.put([abspath, tpath])
|
do_conv = True
|
||||||
self.log("conv {} \033[0m{}".format(tpath, abspath), c=6)
|
|
||||||
|
if do_conv:
|
||||||
|
self.q.put([abspath, tpath])
|
||||||
|
self.log("conv {} \033[0m{}".format(tpath, abspath), c=6)
|
||||||
|
|
||||||
while not self.stopping:
|
while not self.stopping:
|
||||||
with self.mutex:
|
with self.mutex:
|
||||||
|
|
Loading…
Reference in a new issue