On 10/7/06, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
On 07.10.2006, at 17:42, Vlad Seryakov wrote:
> to use which, i do not think they are mutual exclusive
This is the impression what I have after all those
emails.... Although it sounds pretty "opportune" in
the bad sense of the word, I think that a simple
no-nonsense handle-free API + a handle based one
are of popular benefit.
A *result* handle is still needed, but you don't need a handle to a
slave before you can send it a command.
You need a result handle for the case where you want to start the
slave running but not wait for the result immediately. So:
set id [ns_exec_queue -timeout 5 {
# long running stuff...
}]
# do other stuff here...
# later:
set result [ns_exec_wait $id]
(The above is ns_job-like: queue, wait, waitany)
But the case where you need to serially execute jobs in the slave can
be handled by either passing them all at once, or by using a
'withhandle' command.
What do you think of the withhandle command? Can you get away with
passing everything to the slave at once, and if not, does the
withhandle command cover this?