The dummy_string is added as thread.start_new_thread needs two arguments. If we call execute_thread() function as self.execute_thread(), we cannot create a tuple, which is necessary in the second argument. Therefore, I created the dummy_string. This allows to add a tuple as second argument. Not ideal... but works.
Edward d'Auvergne wrote: > This is fair enough. But what is the purpose of dummy_string? > > Cheers, > > Edward > > > On 13 April 2010 07:01, <[email protected]> wrote: > >> Author: michaelbieri >> Date: Tue Apr 13 07:01:28 2010 >> New Revision: 11079 >> >> URL: http://svn.gna.org/viewcvs/relax?rev=11079&view=rev >> Log: >> Storage of thread id is removed from auto_rx_base.py as it is unused >> (threads can't get killed). >> >> Modified: >> branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py >> >> Modified: branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py >> URL: >> http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py?rev=11079&r1=11078&r2=11079&view=diff >> ============================================================================== >> --- branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py (original) >> +++ branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py Tue Apr 13 >> 07:01:28 2010 >> @@ -363,27 +363,14 @@ >> # Display the relax controller. >> self.gui.controller.Show() >> >> - # FIXME: Debugging code, non-threaded exec. >> - self.execute_thread() >> - event.Skip() >> - return >> - >> - # The thread object storage. >> - self.gui.calc_threads.append(Thread_container()) >> - thread_cont = self.gui.calc_threads[-1] >> - >> # Start the thread. >> - id = thread.start_new_thread(self.execute_thread, ()) >> - >> - # Add the thread info to the container. >> - thread_cont.id = id >> - thread_cont.analysis_type = self.analysis_type >> + id = thread.start_new_thread(self.execute_thread, ('dummy',)) >> >> # Terminate the event. >> event.Skip() >> >> >> - def execute_thread(self): >> + def execute_thread(self, dummy_string): >> """Execute the calculation in a thread.""" >> >> # Redirect relax output and errors to the controller. >> >> >> _______________________________________________ >> relax (http://nmr-relax.com) >> >> This is the relax-commits mailing list >> [email protected] >> >> To unsubscribe from this list, get a password >> reminder, or change your subscription options, >> visit the list information page at >> https://mail.gna.org/listinfo/relax-commits >> >> > > _______________________________________________ > relax (http://nmr-relax.com) > > This is the relax-devel mailing list > [email protected] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-devel > > > _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

