> 2) Session events can *only* be observed by setting a watch
> explicitly, so one has to do something similar to wexists("/",
> observe_change_func) in their preferred client API to set a hook which
> will purposefully wait on a session change.

I see I got this part wrong already.  I missed the code within
zk_hashtable.c, which grabs the watcher from the handle manually in
case of SESSION_EVENTS:

    if(type==ZOO_SESSION_EVENT){
        watcher_object_t defWatcher;
        defWatcher.watcher=zh->watcher;
        defWatcher.context=zh->context;

Further comments on the overall context still very welcome.

-- 
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter

Reply via email to