The Windows version of ROOT does do basic multi threading. So you can click on the toolbar to select a macro while another one is still running (the toolbar stays active, macros however run sequentially). ROOT for Unix is not yet multi threaded, so you have to wait for the system to be finished with one macro before the next one can start or before the toolbar can respond to a new click. One of the main problem is that CINT is not yet multi-thread safe. So running two macros at the same time is not possible (even in the Windows version). To keep the GUI responding to events while some long computation is going on in a macro or compiled function one should regularly call TSystem::InnerLoop(). This function will process GUI/timer/socket events that have been collected during the computation period. To see how this is done see for example TMonitor::Select and TGClient::HandleInput. Cheers, Fons. Wei Xie wrote: > > Dear Fons and ROOTer's > > Thank you for the guidance on the GUI class ! There's one more > question, please. > > I tried to run macro "demos.C" of Tutorial and find one problems: > > Once a macro is activated with the toolbar, I can not activate > another one until the first is finished. So if the first one > is time consuming, I'll have to wait a long time till it stops and > start another one. > > Just like many jobs can be submitted and run simultaneously in a computer, > Is there any methods that many macros can be activated and > run simultaneously in root ? > > Sincerely yours > > Xie > > W__W W__W > / \ PHONE : 972 8 9343372 (o) 9471872 (h) / \ > ( 0 _ 0) Fax : 972-8-946-6253 (0 _ 0 ) > \_ V_/ E-mail: xiewei@ceres.weizmann.ac.il \_^ _/ > / \ / \ > =OOOo=======oOOO====================================OOOo=======oOOO====== -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248 E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:33 MET