yyzybb537 / libgo

Go-style concurrency in C++11
MIT License
3.21k stars 757 forks source link

go 是线程安全的吗? #231

Closed nqf closed 4 years ago

nqf commented 4 years ago

我想要在不同线程中调用go

        std::thread([&] {
            for (int i = 0; i < NUM; i++) {
                go[] {

                };
            }
        }).detach();
        for (int i = 0; i < NUM; i++) {
                go[] {
                };
        }