Environment
OS:Windows WSL(Ubuntu20)
➜ build git:(master) ✗ g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
I build the project by CMake. Here is my command.
➜ ChannelsCPP git:(master) ✗ pwd
/home/lzh/github/ChannelsCPP
➜ ChannelsCPP git:(master) ✗ mkdir build
➜ ChannelsCPP git:(master) ✗ cd build/
➜ build git:(master) ✗ cmake .. && make
➜ build git:(master) ✗ ./ChannelsTest
0
1
2
3
4
5
6
7
8
9
------Demo fibonacci (https://tour.golang.org/concurrency/5)-----
0
1
1
2
3
5
8
13
21
34
^C¶
➜ build git:(master) ✗
and the console output is stop at 34 for a very very very long time, I think is't not right.
Is there something wrong in code ?
Environment
I build the project by CMake. Here is my command.
and the console output is stop at
34for a very very very long time, I think is't not right.Is there something wrong in code ?