Merry Christmas Everyone!
I have a child thread invoked by juce to do some background work. When that work is finished I need to have the parent thread invoke a function with the status. Today, I need the method in parent which created this child to hang around, until the child thread is done and invoke the method based on value stored in a location. But I need this parent method to return as soon as it creates the child method.
Is there an easy way for the child thread’s run method to get the parent to invoke a method? Can I pass an arg to this thread constructor, like a reference to the parent thread which can then be used to invoke such a method?
I know there are better ways of doing this like setting up a better communication architecture but that would be an overkill in my case. I just want the activity to happen in the background so that the original parent method can return back to its caller without hitting a timeout.