Hi Jim,
> On 05/07/12 08:53, Jim Easterbrook wrote: >> >> I'm having a problem with pipelines of threaded components sometimes >> failing to terminate when all the child components have terminated. > > > I think I might have found the answer... > > In Axon.ThreadedComponent.threadedcomponent the _threadmain method calls > Component.component.unpause when the user main method terminates. This > should wake up the _localmain method, which immediately checks > self._thethread.isAlive. This could still be true, as _threadmain may not > yet have terminated. If so, _localmain calls Component.component.pause again > and goes back to sleep, never to wake up again. > > Changing _localmain so it only calls Component.component.pause if > self._threadrunning is true seems to solve the problem, but I don't know > what other effects this might have. There are unseen subtleties in this, I'm > sure. This is good to hear. I did take a look last week, but didn't find anything conclusive. I did find a number of interesting ways to mask and hide the problem though. It was clear that it was due to a race between things going to sleep though,so this description looks plausible. I'll see if I can take a look tonight. If this is the solution though the real fix would may be a thread.join before awakening the component one last time - to capture the thread exit point. Regards, Michael. -- You received this message because you are subscribed to the Google Groups "kamaelia" group. To post to this group, send email to kamaelia@googlegroups.com. To unsubscribe from this group, send email to kamaelia+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/kamaelia?hl=en.