We use LIBCx spawn2 API in P_2_THREADSAFE mode to start renderer processes (QTWEBENGINEPROCESS.EXE). P_2_THREADSAFE is needed to make sure thread safety when inheriting handles and such. This mode involves an intermediate process (LIBCX-SPAWN2.WRP) that provides thread safety. However, in case of Chromium it is not a good idea because we (by default) have one rendering process per each tab and this mode doubles the process count. If there are many tabs it will lead to a mere resource waste (the maximum number of processes is quite limited in OS/2 — several hundred).
A workaround here is to provide application-side thread safety (using a mutex) rather than use P_2_THREADSAFE. This will make an intermediate process unnecessary.
We use LIBCx
spawn2
API in P_2_THREADSAFE mode to start renderer processes (QTWEBENGINEPROCESS.EXE). P_2_THREADSAFE is needed to make sure thread safety when inheriting handles and such. This mode involves an intermediate process (LIBCX-SPAWN2.WRP) that provides thread safety. However, in case of Chromium it is not a good idea because we (by default) have one rendering process per each tab and this mode doubles the process count. If there are many tabs it will lead to a mere resource waste (the maximum number of processes is quite limited in OS/2 — several hundred).A workaround here is to provide application-side thread safety (using a mutex) rather than use P_2_THREADSAFE. This will make an intermediate process unnecessary.
See also https://github.com/bitwiseworks/qtwebengine-chromium-os2/issues/12#issuecomment-777108014.