Ask coding questions

← Back to all posts
Cannot use std::sync in c++
awidesky (0)

terminate called after throwing an instance of 'std::system_error'
what(): Operation not permitted
Aborted (core dumped)

This message is printed every time I call std::async function.
Compiler command does have -pthread flag, and it compiles correctly in my Windows clang compiler(higher version than replit though)
Is it my code that has flaw, or is it related with limitation of Linux?
Please let me know if there’s any way to make it work?