Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d388298490e9b5c701fc556097ffe90a351a1923
Ticket: 1437595fffffffffffffffffffffffffffffffff
WinSock cores/hangs on thread or app exit
User & Date: vasiljevic on 2006-03-16 16:19:48
Changes

  1. icomment:
    Logged In: YES 
    user_id=95086
    
    Here is how I would solve that:
    
    I would introduce new platform-specific call: TclpInitializeSockets().
    This should be symetric to TclpFinalizeSockets() and should be called
    from within TclInitSubsystems() in the generic layer.
    This call would do exactly the same what the InitSockets() was doing in 
    tclWinSock.c. Actually, I'd just rename InitSockets() -> TclpInitializeSockets()
    and get it called from the generic part explictly. 
    
    OTOH, the TclpHasSockets() will just examine winsock.hModule != NULL
    hence it is non-block. It will not attempt to lazy-load the entire socket
    subsystem as it is now. So one more lock-source less, which is a nice
    side-effect.
    
    This way the entire socket subsystem is called *once* per thread creation.
    If any call to it breaks at some place AFTER (initially ) loading the socket DLL 
    then we punt (Tcl_Panic).
    
    What do you think?
    
    
    
  2. login: "vasiljevic"
  3. mimetype: "text/plain"
  4. username: "vasiljevic"