Which DBI driver are you using ? (e.g., DBD::ODBC, DBD::mysql, DBD::Pg, etc.)

Which version of Perl/TK are you using ?

Alas, most DBD's have no async i/f, so such things are difficult to handle, esp. given both DBI's and Perl/Tk's less than robust threading implementations.

(Hopefully I'll one day get Thread::Apartment and Perl/TK running together - once I figure out how to handle closures - , and many of these issues will hopefully go away, esp. in combo w/ DBIx::Threaded. The latter may help provide a solution, esp. the async methods (see $sth->start_execute()), tho I haven't yet tried to get pTk and DBIx::Threaded to play nice together - which I'll be needing to do soon as well).

In the near term, you might try running Perl/Tk in its own thread, open a Thread::Queue, and use Storable to transer result data (not the handle, the actual data) to pTk. Then set an after()/repeat() in pTk to poll the queue.


In reply to Re: Long-running DB query makes Tk application unresponsive by renodino
in thread [solved] Long-running DB query makes Tk application unresponsive by radiantmatrix

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.