|
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
|
||||
|
||||
Fork()
Nielm, Andy, or whomever...
Is the fork() function safe in terms of disposing the thread when it is no longer needed? If I fork() -- and do some function or wait in a loop -- when I break that loop and run out of commands under the fork, does sage handle the 'threads' associated? |
#2
|
||||
|
||||
I hope so I always assumed it did!
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#3
|
||||
|
||||
I would think it has to be safe in terms of cleaning up after itself, since there is nothing that I know of to EndFork, UnFork, DeFork, WashFork, etc. When the widget chain in the Fork ends, that's the end of that thread.
BTW: I recently asked about using an attribute that was defined under a Menu or OptionsMenu. I have some Forks in AfterMenuLoad hooks that use such local attributes/variables, so I wanted to confirm what would happen to the variables used in the Fork if the Menu/OptionsMenu were exited before the Fork did & was told that it should be safe, since the variables shouldn't be disposed until after the Fork was done with them. - 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. |
#4
|
||||
|
||||
Java's garbage collection automatically handles cleanup when those threads terminate. Nothing to worry about.
__________________
Jeffrey Kardatzke Founder of SageTV |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|