Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sum #15

Open
LoPA607 opened this issue Oct 17, 2024 · 0 comments · Fixed by #22
Open

Sum #15

LoPA607 opened this issue Oct 17, 2024 · 0 comments · Fixed by #22
Labels
bug Something isn't working

Comments

@LoPA607
Copy link
Contributor

LoPA607 commented Oct 17, 2024

https://github.com/wncc/Hello-Foss-PyThread.cpp/blob/main/src/wrong_sum.cpp
In this code snippet some threads show wrong sum finally .
This is one of the output
Task computing Sum(300,399) from 4 of 8
Task computing Sum(200,299) from 4 of 8
Task computing Sum(300,399) from 4 of 8
Task computing Sum(400,499) from 4 of 8
Task computing Sum(100,199) from 4 of 8
Task computing Sum(200,299) from 4 of 8
Task computing Sum(300,399) from 4 of 8
Task computing Sum(100,199) from 4 of 8
Task computing Sum(100,199) from 4 of 8
Thread computing Sum(Task computing Sum(500Task computing Sum(400,499) from 4 of 8
200,299) from 5 of 8
Task computing Sum(,1599) from Task computing Sum(0200,299) from 6 of ,Task computing Sum(400,499) from 5 of 8
Task computing Sum(400,499) from 5 of 8
Task computing Sum(300,399199) from ) from 52 of 8
8Task computing Sum(400,499) from 2 of 100
Task computing Sum(Task computing Sum(500,599) from 6 of 3008,
of 8
Task computing Sum(Task computing Sum(500,599) from 3000,399) from 4 of 8
Task computing Sum(500,599) from 4 of 8
Task computing Sum(Task computing Sum(500,599) from 4 of 8
Task computing Sum(400,499) from 4 of 8
Task computing Sum(200,299) from 4 of 8
Task computing Sum(300,399) from 4 of 8
Task computing Sum(400,499) from 4 of 8
,Task computing Sum(500,599) from 4 of 8
5008 of Task computing Sum(
399 of 500 of ,8
) from 83 of 8
8199
) from 7 of 8

  1. from 6 of 8
    ,599) from 4 of 8
    Sum = 4800
@LoPA607 LoPA607 added the bug Something isn't working label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant