Код: Выделить всё
#include
#include
#define N 1024*1024*1024
#define num_threads 8
using namespace std;
long x[num_threads] = {0};
// thread function prototype
void* threadnfunc (void *);
void func (int);
int main() {
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79478576/unable-to-achieve-multithreading-in-wsl2[/url]