Quoting [Raul Sirvent] (Nov 09 2005):
Ah, I am having a Deja Vu here :-) I found in one of our earlier discussions:
You mean we are always talking about the same thing? That's not good... :)
Right you are! How is wether in Barcelona :-P? (Hehe, now that I am in Louisiana for a while, and don't have to suffer from the rainy Dutch Fall I actually dare to ask :-P)
Yes. It is clear now. You support a threaded model with asynchronous notifications, and you don't support a non-threaded model with synchronous notifications. I'm just a bit worried about the CPU wasted with active waits (to receive callbacks) in the main thread, or even having to insert sleeps (as you do) in the code. Do you think it is really so difficult to support both? (as Globus does, for instance).
difficult not: void event_poll { while ( ! event_counter ) { // that noeeds virtually NO CPU nanosleep (10); } } The internal callback mechanism would then increase event_counter before any callback is issued. The question with that really is: - do you want to wait for specific types of events -> how are types specified? - do you want to wait for events from any task? -> what object has the event_poll method? Cheers, Andre. -- +-----------------------------------------------------------------+ | Andre Merzky | phon: +31 - 20 - 598 - 7759 | | Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 | | Dept. of Computer Science | mail: merzky@cs.vu.nl | | De Boelelaan 1083a | www: http://www.merzky.net | | 1081 HV Amsterdam, Netherlands | | +-----------------------------------------------------------------+