Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/RTL/Delphi/Thread support    [ Add a report in this area ]  
Report #:  101114   Status: Closed
TThreadedQueue fails with multiple consumers part 2
Project:  Delphi Build #:  16.0.4316.44803
Version:    16.2 Submitted By:   Leif Uneus
Report Type:  Crash / Data loss / Total failure Date Reported:  11/17/2011 4:15:18 PM
Severity:    Critical / Show Stopper Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   288859
Resolution: Fixed (Resolution Comments) Resolved in Build: : Update 4
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 6
Description
See QC91246 for a background.
TThreadedQueue failed when multiple consumers were draining the queue empty.

This was fixed in XE2.

A similar problem arises when the queue is full.
The fault is in TMonitor.RemoveWaiter.

See attached test program that stresses the queue in the full state.
Steps to Reproduce:
Run attached test program.
Workarounds
None
Attachment
TestThreadedQueue.zip
Comments

Leif Uneus at 2/29/2012 10:36:16 AM -
With XE2 Update 4 there was a fix for TMonitor that cured the problems in TThreadedQueue. Tested it also in a multiple producers/multiple consumers setup.

Tomohiro Takahashi at 2/29/2012 10:57:09 PM -
yes, thanks for the confirmation.

Server Response from: ETNACODE01