How to set the stacksize with C++11 std::thread

后端 未结 6 1724
野性不改
野性不改 2020-11-29 03:06

I\'ve been trying to familiarize myself with the std::thread library in C++11, and have arrived at a stumbling block.

Initially I come from a posix

6条回答
  •  忘掉有多难
    2020-11-29 03:54

    You can do some modifications like this if you don't want to include a big library.

    It is still dependend C++ compiler STL library. (Clang / MSVC now)

    HackingSTL Library

    std::thread thread = std::stacking_thread(65536, []{
        printf("Hello, world!\n"); 
    });
    

提交回复
热议问题