thread not firing on Pi

  1. last year

    David G

    29 Oct 2018 Pre-Release Testers, Xojo Pro Chilliwack, BC

    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?

  2. Paul L

    29 Oct 2018 Xojo Inc, Third Party Store

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

  3. David G

    29 Oct 2018 Pre-Release Testers, Xojo Pro Chilliwack, BC

    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.

  4. Tim S

    29 Oct 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    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

  5. David G

    29 Oct 2018 Pre-Release Testers, Xojo Pro Chilliwack, BC

    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.

  6. Tim S

    29 Oct 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    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

  7. William R

    29 Oct 2018 Pre-Release Testers, Xojo Pro Irvine, California USA

    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?

  8. John A

    29 Oct 2018 Pre-Release Testers Las Vegas, Nevada

    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.

or Sign Up to reply!