in reply to Re^6: Annoying threads share problem!
in thread Annoying threads share problem!

Yea, this is the current solution. I have some flag that the main (tk) thread checks every 20 ms or so... updates @choices when flag set.. Although I would prefer that the searchUpdate thread notified the main thread somehow, this works just fine. But seems like such a CPU waste (although its not many instructions... some jump and a check and jump back).

Replies are listed 'Best First'.
Re^8: Annoying threads share problem!
by zentara (Cardinal) on Oct 10, 2005 at 17:31 UTC
    I havn't messed with it lately, and didn't experiment across threads with it, but you might be looking for using shared memory. See "perldoc perlfunc /shmget" and "perldoc perlipc /SysV" . What it does is setup memory segments which can be directly read by separate processes. It requires handling alot of details, but it is supposedly the fastest IPC. Check out Tk-shared-mem-ipc for how to use it it with Tk.

    I'm not really a human, but I play one on earth. flash japh
      Thanks! Too bad this only for Linux!