[cmake-developers] kwsysProcess threadsafety

Sebastian Holtermann seblist at xwmw.org
Fri Jan 5 15:25:17 EST 2018


On Freitag, 5. Januar 2018 13:00:30 CET clinton at elemtech.com wrote:
> Cool.  I'd like to have parallel automoc and uic.
> 
> How about this 4th option?
> Don't use threads.  A single thread is able to spawn multiple processes, and
> wait on multiple processes, and react when 1 or more processes change
> state.  I'm probably not familiar enough with kwsysProcess to know if this
> approach will work, but it might be easier and simpler(?) than making it
> thread safe.
> 
> Clint
> 

AFAIK there are two interfaces inside CMake that allow to start a process,
kwsysProcess and libuv.

kwsysProcess allows to start a single process and wait for it to finish. I 
thinks it's also possible to start multiple parallel processes.
But there's no interface to select/poll a number of parallel processes.

So the 4th option would boil down to use libuv for process management.

Sebastian



More information about the cmake-developers mailing list