Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 33c50e83ff1ecb5f359c7320bf605d309169f83f
Ticket: 932314ffffffffffffffffffffffffffffffffff
epoch safety in threads?
User & Date: vasiljevic on 2004-06-09 22:22:40
Changes

  1. icomment:
    Logged In: YES 
    user_id=95086
    
    OK. 
    
    Just for your info: we already thought about 
    reader-writer locks but abandned them
    because of the potential overall speed impact and
    eventual writer starvation issues. This was based
    purely on experience. We had no time to deeply 
    check pros/cons of reader-writer locks at
    that place and in the given time we had to fix the 
    main problems (memory corruptions). 
    
    As you said, the reader-writer model might do given the 
    very low writer frequency. Nevertheless, changes to
    accomodate to reader-writer lock model might not be 
    that trivial as it seems on the first glance...
    
    I believe your main concern is the hidden reference of the
    filesystem record from within the Tcl path object and its
    potential mismatch with the actual authoritative static 
    counterpart held thread-wide, right? 
    Maybe the better way would be to avoid the master 
    list of filesystems altogether and just leave the per-thread
    ones. Those will have to be locked just once for the 
    duration of register/unregister FS. This would entirely
    eliminate any complex synchronization issues and
    make the (already complex FS) code even simpler. 
    Just a side-thought...
    
    Zoran
    
    
  2. login: "vasiljevic"
  3. mimetype: "text/plain"
  4. username: "vasiljevic"