|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Exiting global forked threads that loop
In case anyone else is using a global forked thread that loops the entire time that SageTV is running...
I recently noticed that a forked loop was continuing to run on my SageTV server after a Placeshifter or MVP client disconnected. This particular loop (to update the disk space usage info) was a global loop, meaning it wasn't linked to any particular menu's hooks and did not shut off via a variable setting when the menu was exited. This is not an issue for a local client UI, because when you exit the program, all code associated with that program will cease to execute. But, since remote clients run as part of the server application, exiting the remote client will not automatically kill the permanent global loop on the server. As multiple remote clients connect & disconnect, these background loops can easily multiply and eat cpu time. Thus, all forked threads need to be able to exit their loops when a client disconnects. If any other globally looping threads have this issue, there are at least a couple ways this can be done:
A 'just in case' reminder: don't forget to make sure all non-global hooks that are linked to specific menus also stop themselves eventually. This is usually done by setting a variable in the BeforeMenuUnload hook that tells the local loop to end because the menu no longer needs it. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#2
|
|||
|
|||
Quote:
Dirk |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|