I have a function like this that is working fine:
void BigFunction()
{
void FunctionA(std::shared_ptr<ClassC> c);
}
now I want to add another function inside BigFunction()
void FunctionB(std::shared_ptr<ClassC> c);
which also take std::shared_ptr<ClassC> c as the input.
How do I do it correctly and safely so that both FunctionA() and FunctionB() can run in parallel, which means these two functions don't need to wait for each other and don't interfere with each other? Thanks.
Edit: Here is the link of the code that I try but failed: https://onlinegdb.com/BJ5_BC0jI