RE: [Freevo-devel] Re: Thread handling in Freevo
> IIRC, means that the child is dead, but the parent hasn't > 'wait'ed for the return value. On exit, a process is reduced to it's > exit value and will remain a process until the parent calls > wait. Or if the parent dies, too, than init will wait and this will > happen at once. > Yes, this is what I understand defunct to mean, but in the case, my thread.polll() is still returning -1. So the parent (excuse my lack of knowledge) is still waiting.. > > Did you experience this? Once they are I can only kill > > them with a reboot.. > > Kill the parent, that should help. > This would be a nice option.. however, I'm waiting for something to happen finish.. I cannot continue on and say, burn the audio disc, until I am sure all the wav files have been created.. Again to Nicolas: Doing some further testing, I actually get 'backup complete' messages when I rip in trakc mode tccat with dvdbackup.py. So i think whatever its doing is working.. Its only when trying to rip with subtitles that it hangs, something is reporting that its not done.. And bruno, if your watching ;-): DVD writing works.. However, menu status willnot change from 'stop' to fresh write again without first stopping.. I think this is to do with defunct-ness.. Anyone else running gentoo and kenrel 2.6.7? Can I you respond I'd love to do some testing with you... Mick --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
[Freevo-devel] Re: Thread handling in Freevo
"Mick" wrote: > Nicolas, > > I am having issues that i cannot follow with threads atm. All my childs are > hanging, they appear in 'ps aux' IIRC, means that the child is dead, but the parent hasn't 'wait'ed for the return value. On exit, a process is reduced to it's exit value and will remain a process until the parent calls wait. Or if the parent dies, too, than init will wait and this will happen at once. > Did you experience this? Once they are I can only kill > them with a reboot.. Kill the parent, that should help. Dischi -- My opinion is neither copyrighted nor trademarked, and it's price competitive. If you like, I'll trade for one of yours. --- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
Re: [Freevo-devel] Re: Thread handling in Freevo
On Fri, 2004-08-06 at 16:07, Hans Meine wrote: > Alan Cox' state machine comment applies here ;-) > But state machines are admittedly not the way to program IMHO. Auto-generated > state machines for parsers are OK, but elsewhere you don't want to have code > that implements branching state machines with more than say 5 states. ;-/ Yeap, and key word here is auto-generated, it needs a describing language, and after generation they are not human readable. > OTOH this 5-childs-in-a-row thingy is a bordercase. One _can_ split that code > up into different functions (each setting the next as callback) and at least > have them be sequentially in the source file. ;-) 1. Not so border line as i wish, cd_burn plugin right now has one of these :) and not only five, as many as the tracks you want to burn to CD 2. hmmm .. five functions (even if sequential in source file ;) ) against one function with a for a in bla Bruno --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
Re: [Freevo-devel] Re: Thread handling in Freevo
On Friday 06 August 2004 16:58, Bruno Tavares wrote: > Don't take me wrong.. callbacks are great if you have code that fires up > a child and needs to do something when it dies. > But what if you want to fire up 5 childs... but in a sequential way > (meaning the second one can only be fired when the first one terminates, > and if terminates with success)? Alan Cox' state machine comment applies here ;-) But state machines are admittedly not the way to program IMHO. Auto-generated state machines for parsers are OK, but elsewhere you don't want to have code that implements branching state machines with more than say 5 states. ;-/ OTOH this 5-childs-in-a-row thingy is a bordercase. One _can_ split that code up into different functions (each setting the next as callback) and at least have them be sequentially in the source file. ;-) -- Ciao, / /.o. /--/ ..o / / ANS ooo --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
Re: [Freevo-devel] Re: Thread handling in Freevo
On Fri, 2004-08-06 at 15:40, Dirk Meyer wrote: > Yes and no. You can still use threads, but you shouldn't. You need a > _very_ good reason why. What will removed is the bad hack how to start > processes from threads, that is a very bad hack. > > About not using threads: there will be a doc how to create a plugin > like yours without threads. The cdbackup plugin will be such an > example. What you do is waiting for an event (child dies). Why use a > thread? Better use a callback: "call this function if that child > dies". > Don't take me wrong.. callbacks are great if you have code that fires up a child and needs to do something when it dies. But what if you want to fire up 5 childs... but in a sequential way (meaning the second one can only be fired when the first one terminates, and if terminates with success)? With callbacks the code would be extremely messy, in this case i still like more the popen and wait functions. Bruno --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
[Freevo-devel] Re: Thread handling in Freevo
"Mick" wrote: >> This will be gone. You should _not_ use threads at all. I will >> integrate a notifier loop allowing select, timer and stepping. >> > Yes, well.. I dont'mind being the first ot say that I will need some very > well documented examples on how *not* to use threading.. Its taken me long > enough to get to this stage ;-) > > Just to be sure.. we are talking about removing this feature right? > > class main_thread_name(threading.Thread): Yes and no. You can still use threads, but you shouldn't. You need a _very_ good reason why. What will removed is the bad hack how to start processes from threads, that is a very bad hack. About not using threads: there will be a doc how to create a plugin like yours without threads. The cdbackup plugin will be such an example. What you do is waiting for an event (child dies). Why use a thread? Better use a callback: "call this function if that child dies". Dischi -- I just got lost in thought... It was unfamiliar territory. --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
RE: [Freevo-devel] Re: Thread handling in Freevo
> This will be gone. You should _not_ use threads at all. I will > integrate a notifier loop allowing select, timer and stepping. > Yes, well.. I dont'mind being the first ot say that I will need some very well documented examples on how *not* to use threading.. Its taken me long enough to get to this stage ;-) Just to be sure.. we are talking about removing this feature right? class main_thread_name(threading.Thread): Mick --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
[Freevo-devel] Re: Thread handling in Freevo
Some future warning for Freevo 1.6.0: Nicolas Michaux wrote: >> Thanks for all the time saving in threads coding ;) > > Some notes about thread/child handling in freevo : > > - All childs spawned in a thread must be spawn by the main thread in order to > keep control on it (freevo has a workaround by sending an event > OS_EVENT_POPEN2 to the main thread in util/popen3.py) This will be gone. You should _not_ use threads at all. I will integrate a notifier loop allowing select, timer and stepping. [ searching for the correct signature ... ] Dischi -- "A Computer is a state machine. Threads are for people who can't program state machines." - Alan Cox --- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com ___ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel