thread not firing on Pi

The following reports status running (0) on Windows 10, but not running (4) on a Pi 3+ (Xojo 2018 1.1, vers 2 crashes before any of my code runs):

Thread1.Run
Status.text=“thread status=” +str(thread1.state)+ EndOfLine + status.text

I have a timer running to check on the thread, it also reports the thread is not running on the Pi.

Do threads not work on a Pi?

I just tried Examples/Desktop/Threading/ThreadingExample on my Pi 2 with 2018r3 and it seems to be running fine.

Yes, that demo works for me too. It is more complicated than my single thread app, and I haven’t found the difference from my code that allows my need single thread app to work in Windows, but not the Pi.

In my experience, 2018 R1.x R2.x will not work. 2018R3 wants to but quits unexplicably. I have not have the time to find the problem. However 2017R3 does work fine.

TIm

Tim, thanks the thread does run under 2107R3, or at least its status is running. I still have to figure out why the code in the thread is not executing like it does when running in Windows.

I have not tried to create threads for Pi.
I just broken them into separate apps and let the OS do the work. It also made more sense to do that anyway

FWIW I run lots of threads on Pi, and have great success. Have you tried making a super simple app for the Pi with a simple thread, perhaps something even more simple than the included example app?

I have several threads running on a couple of different Pi projects. The GPIO library interface doesn’t generate ‘events’ directly so if you want to read pins (buttons) , set a timer to poll the pin status. Then optionally call an ‘event’ handler.