I have a problem with pplx::task from cpprest (casablanca). After forking my process to create a daemon, the tasks are not executed and wait forever.
auto task = pplx::create_task([] {
std::cout << "Hi I'm a task " << std::endl;
});
task.wait();
// Create daemon process (not included for simplicity)
auto notWorkingTask = pplx::create_task([] {
std::cout << "Hi I'm a task in daemon" << std::endl;
});
notWorkingTask.wait();
Any idea how to archieve that ? I suppose there is a boost::asio::io_service on background and need to notify it with :
boost::asio::io_service::notify_fork(boost::asio::prepare_fork);
Sysout (this is simulated one, we use syslog because daemon has no access to sysout)
Hi I'm a task
Edit : There are a feature request here Somebody know a workaround ?