Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Feature: on-demand thread creation/lib initialization [68]

$
0
0
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: Hi Marc_R, What exactly are you looking to accomplish with this feature? Currently there is a [pull request](https://casablanca.codeplex.com/SourceControl/network/forks/simonlep/cpprest/contribution/8059) that makes the threadpool used for scheduling tasks be lazy initialized. This can work for forking processes in Linux as long as you don't schedule any tasks. Steve

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>