<div dir="ltr"><div><div><div>>
3) Abandon the idea to parallelize AUTOMOC/UIC<br><br></div>please no ! moc is a huge bottleneck in my builds (to the point that using <a href="https://github.com/woboq/verdigris">verdigris</a> instead ends up having faster build time overall).<br><br></div>Best,<br></div>Jean-Michaël<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div><font color="#783f04"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c">-------</font></div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c">Jean-Michaël Celerier</font><div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c"><a href="http://www.jcelerier.name" target="_blank">http://www.jcelerier.name</a></font></div></div></div></div>
<br><div class="gmail_quote">On Fri, Jan 5, 2018 at 8:34 PM, Sebastian Holtermann <span dir="ltr"><<a href="mailto:seblist@xwmw.org" target="_blank">seblist@xwmw.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
As you might have noticed I tried to parallelize AUTOMOC/UIC.<br>
<a href="https://gitlab.kitware.com/cmake/cmake/merge_requests/1632" rel="noreferrer" target="_blank">https://gitlab.kitware.com/<wbr>cmake/cmake/merge_requests/<wbr>1632</a><br>
The issue that's blocking it now is that the kwsysProcess framework<br>
isn't thread safe. As a consequence it is not possible for threads to<br>
start processes concurrently using the kwsysProcess framework.<br>
<br>
There are three options I see<br>
<br>
1) Make kwsysProcess thread safe<br>
<br>
I don't think it's impossible but it's not a small task.<br>
Looking through the code I found a few issues that<br>
would block the whole idea for me.<br>
- OpenVMS: I have little to no knowledge about OpenVMS.<br>
Wikipedia says it is basically abandoned.<br>
Can the OpenVMS code be removed? I couldn't test it anyway.<br>
<br>
- C vs. C++<br>
There's a lot of C in processUNIX.c (list allocation etc.).<br>
I would prefer to use C++11 (or higher), especially<br>
std::array, std::vector, std::thread, std::mutex, etc..<br>
Is C++11 acceptable in kwsysProcess?<br>
This would make processUNIX.c processUNIX.cpp?<br>
<br>
2) Use libuv instead<br>
<br>
Using the libuv event loop is overkill and would probably imply that<br>
more threads are started than necessary<br>
(the libuv thread pool will be started anyway).<br>
But it would allow to start multiple concurrent (moc/uic) processes.<br>
Is there a reason to not use libuv?<br>
<br>
3) Abandon the idea to parallelize AUTOMOC/UIC<br>
<br>
Well, I liked the idea.<br>
<br>
<br>
Any thoughts?<br>
<br>
-Sebastian<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake-developers</a><br>
</blockquote></div><br></div>