Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7140a2eaba6b021beb055a7a857ab8f69f7bc327
Ticket: 3408824fffffffffffffffffffffffffffffffff
iocmd.tf-24.16 unstable w/ -DPURIFY
User & Date: andreas_kupries on 2011-09-20 00:51:38
Changes

  1. icomment:
    Alexandre, I don't remember if I considered your alternative. Not surprising, given that it is seven years now since the TIP http://tip.tcl.tk/219.html was made. On re-reading the section regarding the handling of the interaction between RCs and Threads I might have have considered it and discarded, given that I provide a use case for the current design (Using a pair of RCs for stream-based thread communication). Not sure however.
    
    > When transferring a RC, in addition to tranferring ownership of the
    > channel as usual, just pass the (string) name of the handler proc "foo".
    > Then make it the script writer's entire responsibility to populate the dest
    > thread with the necessary procs and data for [foo write] et al to be
    > meaningful *there*.
    
    Note that this makes RCs (a) special (case) with regard to transfering between threads. With all other channel types you can simply transfer and them use them. With RCs you now have to perform lots of setup to make it work. In this my approach fits IMVHO better, without special case setup on part of the script writer. The user does not have to care if it is an RC which is transfered, or not. This becomes especially important when your script is an application using channel provided by some library. You usually don't want to know how the channel is implemented, and for this you would have to.
    
    > I know it's a bit late to react, sorry. But it seems to me that all the
    > special-casing of "thread-transferring an RC" (the hidden "thread::send +
    > pseudo-vwait", plus all the stuff to encapsulate parameters and results
    > without using cross-interp objects, plus the specific steps to avoid
    > deadlock, etc...) would vanish to be replaced
    
    IOW. the complexity and special casing is not really going away, only simply shifted around and changing its nature a bit (setup with yours vs. all the internal transfer mgmt with mine).
    
    > by explicit script-level
    > stuff that is already covered in the existing implementation of the
    > primitives.
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"