Hello,
I would like to use casablanca in a child process in Linux.
When the application starts the crossplat::threadpool::s_shared is automatically constructed in the parent process. However, the 40 threads are not inherited by the child process created by a fork call and, thus, I cannot use casablanca in the child process.
It would be helpful for me if I could control when the threads are created, a sort of init_casablanca() function.
Regards,
Sorin
Comments: A pull request has been merged that lazy instantiates the threadpool until actually needed. Now if you don't use anything with tasks it will be possible to fork another process. This change is in the development branch and will be in the master in 2.5.0. Steve
I would like to use casablanca in a child process in Linux.
When the application starts the crossplat::threadpool::s_shared is automatically constructed in the parent process. However, the 40 threads are not inherited by the child process created by a fork call and, thus, I cannot use casablanca in the child process.
It would be helpful for me if I could control when the threads are created, a sort of init_casablanca() function.
Regards,
Sorin
Comments: A pull request has been merged that lazy instantiates the threadpool until actually needed. Now if you don't use anything with tasks it will be possible to fork another process. This change is in the development branch and will be in the master in 2.5.0. Steve