Skip to content

the test result is wrong? #3

@LiuYinCarl

Description

@LiuYinCarl

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions