Closed tom9672 closed 2 years ago
It works now, I tested many times and the 'incorrect wkc' never happened. I just tried to:
class A:
def setup():
...
def teardown():
...
from xxx import A
class B:
def __init__(self):
self.a = A
self.a.setup()
b = B
b.a.teardown() # some times, it will happen 'incorrect wkc'
from xxx import A
class B:
def __init__(self):
self.a = A
self.a.setup()
def stop(self):
self.a.teardown()
b = B
b.stop() # tried many times, not happen 'incorrect wkc'
not clear why, but it seems the issue is solved. Does somebody knows why? or any other better solutions.
BWT, what makes the incorrect wkc? It also happened that I didn’t use the teardown to stop the pdo. but the incorrect wkc occur.
I try to use two functions, one does the setup and another does the teardown.
Sometimes I call the teardown, it successfully stops the thread and closes everything. But sometimes it prints 'incorrect wkc', I checked the actual wkc is -1 or 0, and the expected is 9.
Does that mean the teardown is already close to the master, but the pdo_thread is still running?