Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python: Added a safety timeout in the new-thread wait loop.
[ashd.git]
/
python3
/
ashd
/
serve.py
diff --git
a/python3/ashd/serve.py
b/python3/ashd/serve.py
index
ebee436
..
ce17b9d
100644
(file)
--- a/
python3/ashd/serve.py
+++ b/
python3/ashd/serve.py
@@
-144,7
+144,7
@@
class freethread(handler):
th = reqthread(target=self.run, args=[req])
th.start()
while th.is_alive() and th not in self.current:
th = reqthread(target=self.run, args=[req])
th.start()
while th.is_alive() and th not in self.current:
- self.tcond.wait()
+ self.tcond.wait(
1
)
def run(self, req):
try:
def run(self, req):
try:
@@
-214,7
+214,7
@@
class resplex(handler):
th = reqthread(target=self.handle1, args=[req])
th.start()
while th.is_alive() and th not in self.current:
th = reqthread(target=self.handle1, args=[req])
th.start()
while th.is_alive() and th not in self.current:
- self.tcond.wait()
+ self.tcond.wait(
1
)
def handle1(self, req):
try:
def handle1(self, req):
try: