Bug 25928

Summary: Barrier constructed with 0 participants will hang on AddParticipant
Product: [Mono] Class Libraries Reporter: Konrad Kruczyński <konrad.kruczynski>
Component: SystemAssignee: Marek Safar <masafa>
Severity: normal CC: masafa, mono-bugs+mono
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Simple test that shows the problem

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