The advantage of socket_handler_base_ is that it allows extension to your suggestion of multiple socket_handlers, timers, etc. and is compatible with the current implementation (as long as the user hasn't typed cocurrent from the keyboard).
Calling in any other fixed locale, such as _z_, would break existing code. Calling without a locale, as is currently implemented, means that the handler is called in an unpredictable locale, which is simply an error in implementation, it seems to me. Henry Rich bill lam wrote: > On Fri, 31 Jul 2009, Henry Rich wrote: >> Socket events make a call to socket_handler, right? No - they call >> socket_handler _in the locale of the immediate session_. This creates a >> problem. >> >> If, for debugging, I type >> >> cocurrent 'testlocale' >> >> and then start some socket activity, I see >> >> |value error: socket_handler >> | socket_handler'' >> >> because, methinks, socket_handler_testlocale_ has been called. >> >> I can paper over this by defining socket_handler_z_, but I suggest that >> for Eric to make the call to socket_handler_base_ would be a better >> solution. > > This is the same for other system events eg. timer event. I had > suggested allowing multiple handlers can be defined when user > specified a locale name such as, > > socket_handler_a_ > socket_handler_b_ > socket_handler_c_ > socket_handler_d_ > > and similar for timer. > > However I cannot see the advantage of socket_handler_base_ over > socket_handler_z_ > > -- > regards, > ==================================================== > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
