Component index
Section index

Component uithread


Search

	/*
	    Sometime we which to have two dialogs at once (consider the FRAMEWORK
	    component if you wish to do that). The uithread function is handy
	    but the uithread TLMP component is easier to handle. It triggers
	    up to 3 threads and waits for their completion. As such is allows
	    the various threads to share glocal,
	*/
	static void sample_dialog(const char *title)
	{
	    DIALOG dia;
	    SSTRING s;
	    dia.newf_str ("field1",s);
	    dia.edit (title,"",help_nil);
	}
	
	<mod>
	static void sample_uithread()
	{
	    <call uithread>();
	    <f thread1>
	        sample_dialog("dialog thread1");
	    </f>
	    <f thread2>
	        sample_dialog("dialog thread2");
	    </f>
	    <f thread3>
	        sample_dialog("dialog thread3");
	    </f>
	    </call>
	    xconf_notice ("All threads done");
	}
	</mod>