Bug 25928 - Barrier constructed with 0 participants will hang on AddParticipant
Summary: Barrier constructed with 0 participants will hang on AddParticipant
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-01-12 08:20 UTC by Konrad Kruczyński
Modified: 2015-01-12 11:20 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Simple test that shows the problem (269 bytes, application/octet-stream)
2015-01-12 08:20 UTC, Konrad Kruczyński
Details

Description Konrad Kruczyński 2015-01-12 08:20:17 UTC
Created attachment 9317 [details]
Simple test that shows the problem

Please run attached program. It will hang on barrier.AddParticipant(). The point is that CountdownEvent used underneath will return false when the counter was zero and that's the case here. One of the possible solutions could be to use CountdownEvent.AddCount instead of TryAddCount, I'm sure why the latter was used there.
Comment 1 Marek Safar 2015-01-12 11:20:20 UTC
Fixed in master

Note You need to log in before you can comment on or make changes to this bug.