FINAL REPORT

It works exactly as advertized! Hurrah! My stepper motor has been running now for about 200 hours via this threads scenario.

My particular application proved a bit more complicated as the module I'd been using was OO with a number of hashes, one of them quite large. And I find that the threads module gets kind of complicated if you try to OO-ify things. Still, not to worry. Quite easily gotten around, that.

Most of that OO business was for non-stepper motor related issues: data and solenoid channels of the LabJack device. OO was by no means required for running the stepper channel as a separate consideration.

So for the stepper motor I pared things back to essentials: just the basic (non-OO) module Device::LabJack. And that part only did I put into a thread with only the absolute minimum of shared scalars.

Once simplifed in that manner it ran like a champ. The Tk GUI is lively again. Excellent suggestion. Thanks Zentara!


In reply to Re^3: Stepper Motor driven via threads module does not freeze Tk GUI by aplonis
in thread How do I pass a reference to another program via @ARGV ??? by aplonis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.