i meet a very strange problem ,here is my simple program:
print ‘MyThread extended from Thread’
t = MyThread()
where it run in my pc ESP, it is normal,print ‘MyThread extended from Thread’
But,where it run in digi CP X4,there is nothing to print.
Thanks very your help!
I make heavy use of threading on the X4 and it works fine.
Make sure your tab/space are correct as a PC will handle mixed space and tabs differently than an X4.
Threading is supported, as well as a lot of other functionality to support thread synchronization (locks, events, etc.). You have the option of creating threads such as the way you mention, or you can even subclass the threading module and create a thread class, in case you want to create multiple threads that do the same job (worker threads) as well as have more control over the thread (creating your own joining, start, stop methods, etc.) Lots of exampels on the web, and most supported by our devices, AS LONG AS the specific functionality isn’t something found in an newer Python interpreter that may not be used on our device.