Multiprocess application?

Is it possible to do that using only Juce ?
Or do you need to use platform dependant code (like CreateProcess under win) ?

No, I’ve never got round to doing any classes for process control (you do mean processes rather than threads, right?).

if u want to launch other applications u can use

bool File::startAsProcess ( const String & parameters = String::empty )

method. Only this method is available in the JUCE.

If u want to handle the current executable in the process level then u can use the Process class.

And if u want to create processes and handle then as u want then better write it of ur own. Jules has done lil work for u in the Process class and File::startAsProcess method i guess. It wont be too tough.

sorry… Jules has not done much in that i guess… I just cross checked…

So u have to do it by urself.

Well, I think Jules has done an amazing work already :slight_smile: !!!

@Jules : yes I’m talking about several processes, not threads :o)

But yeah, I don’t get it ! It’s so simple to do under linux (Fork…you’re done !), and so complex to do under windows. It seems that you can only run external apps with the windows system, no matter what you use (bool File::startAsProcess, CreateProcess, and so on …). You can’t have one single multiprocess application…

However there must be something … For instance look at google chrome : everytime you open a tab, the tab runs into it’s own process, even under windows. I don’t really understand how they made it ! How can you have only one GUI running several processes under windows ??? The only possibility I can imagine is that you launch several Chrome.exe, and the GUI is only created once. Then the subsequent instances have no GUI, and the first instance of Chrime.exe, comunicates with them trough IPCs. But it looks really cumbersome :-/

What do you guys think ?

I don’t know how they do it in chrome, but perhaps there’s some shared memory being used to pipe the graphics across to the main window process?