problem with kylix (C++)
I am writing a multithreaded application and I have designed the backend, now I am designing the UserInterface(UI) for it using Kylix.
>I wanted the backend code to run when I click a button in UI, and at the same time the UI should also be active to handle the events in UI.
so,I created a thread at the click of that button and made my code to run in it, thus after creating this thread the control is returned to the UI to handle the UI events.
Now the problem is - How do I communicate b/w the backend threads and the UI objects. I need to display someting in the UI from the threads created.
I can't speak for this Kylix thing, but I'm guessing that it is some sort of IDE.
What kind of thread are you referring to? Do you fork or clone? In the latter case, just use any variable, be it global or a reference to some private variable. In the former case (and in the latter as well, if you want), use a pipe or socket to send messages.