Reputation: 151
task<void> t = []
{
//do something
};
void post(std::function<void()> tExecute)
{
t = t.then(tExecute);
}
I am trying to create a strand using the above code, where multiple threads can call post to ensure sequential processing of some tasks(functions/lambdas). Is the assignment in post() thread safe?
Upvotes: 2
Views: 90