Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: Tk with thread and stram data

by faustf (Novice)
on Dec 23, 2020 at 20:56 UTC ( #11125695=note: print w/replies, xml ) Need Help??

in reply to Re: Tk with thread and stram data
in thread Tk with thread and stram data

not execute thread with button you can also remove button of my example inspire me this post;displaytype=print;node_id=732294 but i dont know why for me , reply only one time in tk

Replies are listed 'Best First'.
Re^3: Tk with thread and stram data
by Marshall (Canon) on Dec 24, 2020 at 01:10 UTC
    Interesting posts in the thread that you referenced. I didn't have time to run any actual code, but it appears to me that in one post, Tk as running in one thread and a single worker in another thread. Communication between the two threads was via shared memory with a simple lock mechanism. "msg ready" only set by the worker thread and only cleared by the Tk thread. The worker wouldn't be able send another message until the Tk thread clears the shared memory semaphore "msg ready" flag.

    I suspect that there is an answer where the Tk thread polls a shared memory structure every 100 ms or so and accepts work if there is any to be done. Tk cannot wait at an exchange indefinitely or the other GUI buttons will "hang".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11125695]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-06-22 10:49 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (103 votes). Check out past polls.