Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Win32::GUI and threads issue

by dasgar (Priest)
on Jan 15, 2019 at 15:59 UTC ( #1228598=note: print w/replies, xml ) Need Help??

in reply to Win32::GUI and threads issue

You say that you're trying to use Win32::GUI and threads. It sounds like something isn't behaving the way that you were anticipating, but you're not providing information on what it is that you believe is a problem. This is like asking a mechanic what's wrong with your car without providing details about the problem or asking a doctor to give you a medical diagnosis without giving any information on the medical issues that you are having. If you want to get some help, then I would suggest that you help yourself by providing more details on what you are having issues with.

Are you sure that the code you posted is the code that you were testing? The line with sub Window_Terminate{-1} is missing a semicolon at the end, which could potentially prevent your code from running.

I personally have used Win32::GUI and threads so I can definitely say that it is possible to use the combination. As I have already mentioned, since you're not providing information about what problem(s) you are having, it's going to be nearly impossible for others to be able to help.

Replies are listed 'Best First'.
Re^2: Win32::GUI and threads issue
by Garden Dwarf (Beadle) on Jan 16, 2019 at 08:28 UTC

    The code I've posted is supposed to issue numbers. The first thread provides the numbers 0 to 9 to the parent, the second thread 10 to 19, etc. When the parent has all results, he displays all of them (on Win32 interface or into the terminal, depending on the setup I explained above).

    When I use Win32, the application stops without issuing anything (no numbers, no errors). I didn't know where to start investigations, so I posted my questions here.

      So you say you've got logic error... Timer never starts threads never start display never updates? Simplify code
        Seems like if the end of the first thread finishes also the GUI (and the whole application). I'm trying to create the threads now before creating the GUI, as suggested. Then communicating through queues. Will see it that works better.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2021-09-20 08:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found