[mythtv-commits] Ticket #8812: RingBuffer has a number of thread safety issues
MythTV
mythtv at cvs.mythtv.org
Mon Aug 23 03:41:29 UTC 2010
#8812: RingBuffer has a number of thread safety issues
------------------------------+---------------------------------------------
Reporter: danielk | Owner: danielk
Type: defect | Status: assigned
Priority: minor | Milestone: 0.24
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------+---------------------------------------------
Changes (by danielk):
* owner: => danielk
* status: new => assigned
Comment:
This adds back more locks than in the first version of the patch so that
the locking for reads from the buffer can be relaxed to
rwlock.lockForRead() allowing the reads from the buffer to happen while
reads from the disk or other medium is in progress. The performance should
now be as good or better than before. The multitude of QWaitConditions has
also been reduced to just one wait condition, which simplifies the code a
bit and allows performance to be improved.
The two locks that were added can probably be eliminated using QAtomicInt,
but it has a complicated API and several means to shoot yourself in the
foot. Considering the mess that was made of RingBuffer in just a few years
I would like to keep this as simple as possible.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/8812#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list