Re: Anaconda Thread timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-01-26 at 12:04 -0600, Pat Riehecky wrote:
> 
> On 01/26/2016 10:34 AM, Brian C. Lane wrote:
> > On Tue, Jan 26, 2016 at 10:17:13AM -0600, Pat Riehecky wrote:
> > > Is there a clean way to set a maximum runtime for an anaconda
> > > thread?
> > > 
> > No, ThreadMgr is a pretty light framework. The code running in the
> > thread is responsible for shutting it down when done or raising
> > errors
> > when there is a problem.
> > 
> > What are you trying to do that would need a timeout?
> > 
> 
> I've got a thread watching the network state, if the network never
> comes 
> up (because the user didn't ask for it) it sticks.
> 
> I'll just add a check to how long it runs

You could also use something like a threading.Event to signal the
thread that it can go ahead and shut down. Alternatively, if the
"sticking" is when anaconda's trying to exit, you could pass
daemon=False to the threading.Thread constructor which should make all
threads exit when the main thread does.

David

> 
> Pat
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux