There are three answers to this. One is maintaining API sanity: Some if its already been done, and so it continues for consistency. The second is a weird form of optimization and specification: We easily force the operation to occur on the currently active session by making its interface the kernel, instead of having to perform sanity checks to make sure the programmer isn't being a tard. The third is of course to limit what is required by the session, making the session object an even more replacible thing.[..] i think you'd get better semantic meaning here if the method was a Session method instead of a Kernel method.
one of the things that drives me nuts semantically with poe is all these
methods in Kernel space that actually only operate on the Session.
With all of these (post, yield, call, invoke) in the kernel, the only thing required by POE::Session is _invoke_state, the rest is done in the kernel. For the first two, a considerable amount of pre-operation is handled by the kernel. For the latter two, most of it is done in the session particularly when you're not making inter-session calls.
You already know that, though. All I'm saying is, yea, its kinda weird that the methods basically only effect and operate on the session...but in some kind of fucked up way it makes sense, or maybe I'm just tired. But dispite that, initially I agreed with you, but after having kicked it around I kind of like the way it is...forces sanity rather than checks for or assumes it.
- Scott
