Xref: utzoo alt.toolkits.xview:122 comp.windows.open-look:550 Path: utzoo!utgpu!cs.utexas.edu!wuarchive!udel!rochester!kodak!uupsi!sunic!dkuug!resam!andrew From: andrew@resam.dk (Leif Andrew Rump) Newsgroups: alt.toolkits.xview,comp.windows.open-look Subject: COME ON G & G! How do I keep a button busy without busy waiting Message-ID: <1991Feb7.145027.7958@resam.dk> Date: 7 Feb 91 14:50:27 GMT Organization: RESAM Project Office, SAS, CPHML-V Lines: 34 I received three (3) answers to my original very interesting post. :-) YOU CAN DO BETTER - and I don't accept cheating like making the Reset button inactive or changing it to a Reset button, etc.!!! :-( Well instead of writing the whole thing one more time I'll ask only for some suggestions on how to prevent busy waiting if I have the following code (stolen from p.400 in Volume Seven of guess what!): XFlush(dpy); while (!reset_pressed) { notify_dispatch(); XFlush(dpy); /* Here is the problem - I don't have any code to put here! */ } The reason I don't have any code to put in is that I'm waiting (using notify_set_input_func & notify_set_itimer_func) for some input or the timer to time out and I'm using this piece of code because I want to stay in the callback routine to keep the button that activated the callback routine in busy state... Any suggestions? - Please! Leif Andrew Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark UUCP: andrew@ambra.dk, phone: +45 39 27 11 77 / Currently at Scandinavian Airline Systems =======/ UUCP: andrew@resam.dk, phone: +45 32 32 51 54 \ SAS, RESAM Project Office, CPHML-V, P.O.BOX 150, DK-2770 Kastrup, Denmark > > Read oe as: o / (slash) and OE as O / (slash) < <