From: Zoran V. <zv...@ar...> - 2006-07-14 14:20:09
|
Am 14.07.2006 um 16:13 schrieb Vlad Seryakov: > I still think that you could build ns_callback command that will be > similar to ns_conn, i.e. it works only in the context of callback like > ns_conn in the connection thread only. This way you can extend it > as you > wish and be backward compatible > Almost! This is what I also thought at the first glance! But when you think deeper... My idea was to add more information available to the callback in particular, the events of adding, calling and removing. BUT, in order to do that you MUST actually call the callback once at the registration, regulary during the execution and once at the de-registration. Now, this can't be easily done as callbacks may have never been designed for such call pattern! Therefore it is not possible to automate this task as I wanted it. If the callbacks are written with this notion (i.e. that they will be called at least 2 times (on registration and de-registration) then it is another story. But since we cannot really know how all this will react, we can't do that. Effectively I can build a kind-of ns_callback command which is valid only in the context of the callback. But for it to be used the callback must be executed(!) and this is where all comes down. Understand? That's why I had to throw this idea away... I gues I was just not thinking enough beforemath (how could I, we have 32 grades centigrade here and we're all sweating our brains out...) Cheers, Zoran |