Robert Dewar a �crit dans le message : 846rk7$gba$1@nnrp1.deja.com... > In article , > kaz@ashi.footprints.net wrote: > > That's the sense that I get. For example, earlier in the > debate I was told that > > when the requirements change in certain ways, you have to > abandon protected > > objects. E.g. if you need an object's operation to call into > another subsystem > > which may call back. > > Really the point is that protected objects are best thought of > as a framework for constructing very simple synchronization > primitives with a minimum of active code. As soon as a protected > object acquires complex internal logic, it is better represented > by a separate Ada task. > I fully agree here, but there is another issue that is worth mentionning: If you use protected objects, all tasks are in the position of a *client*, which makes termination much more tricky. You must deal with termination by having explicit "termination" messages between tasks, and you must make sure that these messages are sent in all cases, including tasks terminating because of abort or unhandled exceptions. This can be made often automatic if you use rendezvous and an a terminate alternative. -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog