Программы на C++. Форум разработчиков
Anonymous
Невозможно достичь многопоточного чтения в WSL2
Сообщение
Anonymous » 02 мар 2025, 14:50
Я пытаюсь выполнить следующую многопоточную программу C ++ на WSL2: < /p>
Код: Выделить всё
#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]
1740916234
Anonymous
Я пытаюсь выполнить следующую многопоточную программу C ++ на WSL2: < /p> [code]#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]