in reply to [solved] Long-running DB query makes Tk application unresponsive

Hi,

Two things:

I have had reasonable success using the Perl's threading api on windows. In fact, using the new threads, everything work exactly as I expected.

A second approach to threading would be spawning a new process to check. You can use the Tk::Send to communicate between the two. Just make you new process a Main Window that is not visible. It will then be able to use Send, and your Main interafce would use Recieve.

Good luck. Post back what you decided to do and why!.

"Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC
  • Comment on Re: Long-running DB query makes Tk application unresponsive

Replies are listed 'Best First'.
Re^2: Long-running DB query makes Tk application unresponsive
by radiantmatrix (Parson) on Oct 13, 2005 at 22:15 UTC

    Hm, I researched using Tk::Send, but I can't find it as any component in the Tk heirarchy, or indeed anywhere on CPAN or in my local installation. Maybe I'm looking in the wrong place? If I can get it from the ASPN repository, then I can use it. Unfortunately, not unless.

    As to threads, the idea of sharing that much data (and that complex a structure) gives me shudders, because I don't know what I'm doing shared-memory wise. From my research, I've developed an instinctive "share as little data as you can" response. If a few monks here tell me that isn't a valid response, and explain a little bit why, I'll probably go ahead and work on threads.

    I still wonder, though, if there's something I can do to tell DBI or the DB or something to return immediately and notify me when it's finished (or something).

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    "In any sufficiently large group of people, most are idiots" - Kaa's Law
      Update: I was too fast with the response, and missed that nearly everythig I was suggesting you were already doing - sorry, nothing to see

      ...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann