I got the same error. And I think pythonkit don't support subthread, because I really create a serial thread for it. Here is my code :
lazy var thread:Thread = {
var t = Thread(target: self, selector: #selector(begin), object: nil)
t.name = "com.python"
t.qualityOfService = .default // i tested all of qos enum, but all of them not work
return t
}()
.....
@objc
func begin() {
print("pre start")
let example = Python.import("my_python_module")
print("start")
let result = example.start()
print(result)
}
PS: I'm already call self.thread.start() to run the thread.
It's always _pthread_cond_wait () for something