[mythtv-commits] Ticket #5501: Convert pthreads -> Mthread
MythTV
noreply at mythtv.org
Wed Aug 3 01:54:46 UTC 2011
#5501: Convert pthreads -> Mthread
------------------------------+--------------------------
Reporter: ijr | Owner: danielk
Type: task | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------+--------------------------
Comment (by danielk):
* Cleans up some header includes (sed left "mthread.h" with the Qt
headers)
* Changes MThreadPool API in two ways:
* Gets rid of start() methods without a debug name, so we always have
something descriptive for threadRegister().
* Gets rid of reserveThread() and releaseThread(). When we start a long
lived runnable with a reservation there is no reason not to start it right
away; these methods never guarantee that behavior. A new startReserved()
call starts the runnable immediately and increments the reserve thread
count and then the reserve thread count is automatically decremented when
this runnable finishes.
* Adds some debugging to MThreads so you can now query the running threads
and adds a MThread::Cleanup() method which attempts to shutdown all
running threads. This is intended to be used as a last ditch effort in the
MythCoreContext destructor at the point at which no threads should other
than the main one should be running. It also prints out a listing of all
the threads that are running that shouldn't be ; using the debug name
required in the constructor.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/5501#comment:31>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list