Re: blocking Control
Michael Meeks <[email protected]> Mon, 15 Dec 2003 09:54:59 +0000
| Newsgroups | gmane.comp.gnome.components |
|---|---|
| Organization | Ximian. |
| Message-ID | <[email protected]> |
Hi Jacob, On Fri, 2003-12-12 at 18:02, Jacob Perkins wrote: > I'm planning on implementing a (Bonobo) Control that may block. The > blocking time is completely dependent on the individual system/user setup, > could be 'instant', could be 5 seconds or more. Ok; interesting. What precisely is going to block ? presumably not some GUI rendering operation. > So, my question for the experts is whether this control should be provided > through a shlib or exe factory? Well; if you run it as an exe factory, there are some extra overheads, but it will not block the main app (unless you're trying to do multiple non one-way CORBA requests to it while it's in it's blocked state ;-). OTOH, only 1 user of the remote exe will get this behavior, the others (as soon as they require round-trip communication) will block too. > shlib may require apps using the control to implement threading so the > rest of the app doesn't block. > But, it is extremely likely that there will be multiple requests coming in > from one or more apps so if it was an exe, then I may need thread it. > So, any suggestions on which method is 'best'? Sure; simple way to solve the problem in-proc in Gnome 2.5+ is to have a separate thread that does the blocking part of your work, and implement a simple CORBA interface in-proc that calls to that across the threads - thus doing all the work in-process, and isolating the blocking bit. You can also do in-process async calls, to avoid blocking if necessary. Regards, Michael. -- [email protected] <><, Pseudo Engineer, itinerant idiot