I have a personal plugin that is at times misbehaving and going into an undead state. When I try to load the plugin config dialog, I get a beachball and eventually a
- Code: Select all
runDialogForDevice() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
error. I think I've isolated the cause of the timeout to a single library that doesn't behave well and doesn't timeout.
I was looking for a way to wrap calls to this library in a
- Code: Select all
with timeout(seconds=5):
self.foo.do_stuff()
call, but this only works on UNIX. In researching, I came across a lot of ideas that involve various approaches to using threads, multiprocessing queues and decorators. I like the look of using a timeout decorator best, but before opening up that Vietnam, wanted to check here if anyone has come across a timeout feature that runs well under Indigo plugin threading.