SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-25-2006, 07:27 AM
Bohica's Avatar
Bohica Bohica is offline
Sage Advanced User
 
Join Date: Mar 2005
Posts: 218
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?
Reply With Quote
  #2  
Old 03-25-2006, 08:08 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
I hope so I always assumed it did!
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #3  
Old 03-25-2006, 09:43 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
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.
Reply With Quote
  #4  
Old 03-25-2006, 01:05 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Java's garbage collection automatically handles cleanup when those threads terminate. Nothing to worry about.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.