Attachments (11)
Change History (46)
by , 17 years ago
Attachment: | audio_qthread.diff added |
---|
comment:1 by , 17 years ago
Milestone: | unknown → 0.22 |
---|---|
Status: | new → accepted |
Type: | defect → task |
Version: | unknown → head |
comment:2 by , 17 years ago
comment:3 by , 17 years ago
(In [17810]) Switch the Lirc, Joystick and AppleRemote pthreads to QThreads.
Nigel you may want to check the AppleRemote stuff I couldn't test any of that.
comment:4 by , 17 years ago
(In [18133]) Fix AppleRemote re-entrancy bug. The CFRunLoop didn't like being started, stopped, and then re-started, so I have gone back to the original code. (which never actually deleted the object -
it just re-used the first-created instance). Refs #5501.
comment:6 by , 16 years ago
Milestone: | 0.22 → 0.23 |
---|
comment:7 by , 16 years ago
Component: | mythtv → MythTV - General |
---|
comment:9 by , 15 years ago
Milestone: | 0.24 → unknown |
---|---|
Owner: | removed |
Status: | accepted → new |
There's a lot of pthread stuff still remainin in mythxml/web server. Nobody has touched this in ages. Unassigning and bumping to unknown.
comment:10 by , 15 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:12 by , 15 years ago
Converted the threads in ThreadedFileWriter in 482299ae1b12fe on master
comment:14 by , 15 years ago
Converted the TVRec threads (event and recording) in a5a2a9c0192f on master
comment:15 by , 15 years ago
Converted the OSX Controller Thread to QThread
Refs #5501, I converted the Firewire Controller thread from pthread to QThread. This is only for the OSX firewire support, which I can not test for lack of compatible hardware.
Changeset: 50f58070dc7caec760f3c14667b19d97c2630340
comment:16 by , 15 years ago
Convert Linux FireWire Controller Thread to QThread
Refs #5501. Converted the Linux FireWire controller thread from pthread to QThread. As I have no firewire setup, I can not test this.
Changeset: 07dd9d2cb6a1a87d62a90dac8a994b0c16792669
comment:17 by , 15 years ago
Converted firewire signal monitor thread to QThread
Refs #5501. I have converted the firewire signal monitor thread from pthread to QThread. I have no way to test this past compilation.
Changeset: 90d5712719ad1d2c3571d0564e582333aa77a8f3
comment:18 by , 15 years ago
Convert the DVB CI Handler thread to QThread
Refs #5501. I have converted the DVB CI Handler thread from pthread to QThread. I have no way of testing this.
Changeset: 2d86cea00f88f96278140ada5f5b4c9fe7dbcab6
comment:19 by , 15 years ago
Converted IPTVSignalMonitor thread to QThread
Refs #5501. Converted the thread in IPTVSignalMonitor from pthread to QThread. I have no way of testing this, having no IPTV source available.
Changeset: ff9606a53442380a8d128756658cd37657087608
comment:20 by , 15 years ago
CI is not working after commit 2d86cea00f88f96278140ada5f5b4c9fe7dbcab6
follow-up: 28 comment:21 by , 15 years ago
Sorry to hear that. Can you possibly give me information (log files, etc) to help me fix the problem?
comment:22 by , 15 years ago
Convert SignalMonitor's thread to QThread
Refs #5501. Converted the SignalLoopThread from pthread to QThread. As this is in the base class for all of the SignalMonitors, this had a small ripple effect.
Changeset: b1649e3b650b9e3f2338f42e5c81c0f68aed2d4a
comment:23 by , 15 years ago
Converted jobqueue threads to QThread
Refs #5501. I have converted the threads used in the jobqueue from pthreads to QThreads. There may be a small memory leak caused by the use of deleteLater in the ChildJobThread and having no event queue in the QueueProcessorThread. We'll keep our eyes on it.
Changeset: 361f213a2e0a82f0465d28b731ab472a2f47c482
comment:24 by , 15 years ago
Convert MHEG Engine Thread to QThread
Refs #5501. Converted the MHEG Engine thread from pthread to QThread. I have no way to test this past compile.
Changeset: eb7d2bdffcfda1789248786d4bacf9cbc6958649
comment:25 by , 15 years ago
Convert NuppelVideoRecorder threads to QThreads
Refs #5501. I have converted the three threads (Write, Audio and VBI) within NuppelVideoRecorder to using QThreads rather than directly using pthreads.
Changeset: 72f13d4b264927175ac0a20fb8e880a80750bc0e
comment:26 by , 15 years ago
Convert MPEG2replex thread to QThread
Refs #5501. Convert the MPEG2replex thread from pthread to QThread. Additionally, convert the corresponding pthread_mutex and pthread_cond to QMutex and QWaitCondition respectively. I also moved the thread into the MPEG2replex class with the mutex/condvar to make it easier to deal with.
Changeset: cee4487fdaec46c66ad1f5f60e35e0db96736e0f
comment:27 by , 15 years ago
Change NetworkCommandThread in mythfrontend to QThread
Refs #5501. Converted the NetworkCommandThread from pthread to QThread. Also removed the unused SocketThread() and RunSocketThread() methods from NetworkControl as they are unused.
Changeset: 1140e4f45d81653f439672586eb55fb3533be16c
comment:28 by , 15 years ago
Replying to beirdo:
Sorry to hear that. Can you possibly give me information (log files, etc) to help me fix the problem?
Hello Beirdo
I confirm that the problem has been solved with the following commits:
- b584b689422b25aebca7: Fix the DVBCam::IsRunning() to use thread running (2011-03-10)
- 1e0e5091a6d5949ceb80: Check ciHandler for NULL before use since it may not be set if DVBCam::Start() fails and we don't check the return of that function in DVBChannel. (2011-03-10)
Thanks for your helps zeloise
comment:29 by , 14 years ago
Owner: | changed from | to
---|
I am giving this ticket to danielk as he has reverted some of the changes so they can be redone.
comment:30 by , 14 years ago
Summary: | Convert pthreads -> Qthread → Convert pthreads -> Mthread |
---|
The attached patch creates MThread and MThreadPool and converts to their use throughout.
They provide basically the same interface as the Qt classes they are named after, but shutdown DB connections for us and provide additional safety over the Qt classes via simple sanity checks.
Only mythfrontend has had any testing.
by , 14 years ago
Attachment: | mthread-v3.patch added |
---|
comment:31 by , 14 years ago
- 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.
by , 14 years ago
Attachment: | mthread-v4.patch added |
---|
by , 14 years ago
Attachment: | mthread-v5.patch added |
---|
fix segfault on myth system thread shutdown when they weren't started in the first place.
by , 14 years ago
Attachment: | 0002-Change-new-gallery-filter-to-MThread.patch added |
---|
Additional patch (goes with mthread-v5) to change new mythgallery filter thread to mthread
by , 14 years ago
Attachment: | mthread-v6.patch added |
---|
Converts new mythgallery thread to MThread, fixes static DB connection cleanup.
by , 14 years ago
Attachment: | mthread-v10.patch.bz2 added |
---|
Converts various threadpools to MThreadPool and fixes the MThreadPool tracking for StopAllPools()/ShutdownAllPools()
comment:32 by , 14 years ago
Note the patch was applied in [47d67e67], but please use at least [b39d35a4].
comment:33 by , 14 years ago
Note: A fix for the static initialization of the logger and mythsockethread static initializers was applied in [f4ba7827].
comment:34 by , 14 years ago
Refs #5501. Convert DDMapLoader thread to use MThreadPool.
Branch: master Changeset: aa1038ca75dde6117fe873a030734b4246e5ca5a
comment:35 by , 14 years ago
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
I'm closing this ticket. The only remaining pthread code is:
jobqueue, a detached thread which can't be implemented with MThread/QThread darwindfirewiredevice.cpp, a special hardware specific thread on a platform with pthreads mpeg2fix.cpp, which uses pthread wake one semantics.
And some imported code where we want upstream compatibility. Of those only mpeg2fix is really a candidate for porting.
Many of our threads don't use the Qt event loop, so event driven Qt classes won't work properly in those threads, but that is a separate issue. All the threads now using MThread will no longer have problems with thread local storage, which prevented things like QRegExp from working efficiently.
(In [17729]) pthread -> QThread for audio output.
Refs #5501.