Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4ba623c97577eb1a8142876622815dd75eaa615f
Ticket: 2869384fffffffffffffffffffffffffffffffff
Tcl_AsyncMark does not work with --enable-threads
User & Date: flatworm on 2009-09-29 19:19:41
Changes

  1. icomment:
    It seems this function is actually named pthread_mutex_trylock().
    
    The idea is interesting, but I don't quite get how to implement it:
    In the defautl mode of operation pthread_mutex_trylock() is defined to return immediately with EBUSY if the mutex lock is held, and Tcl core doesn't expect this behaviour from the mutex API it uses (and exposes).
    If we instead make all mutexes "recursive" (in terms of pthreads), this will fix deadlocks occuring in the same thread because of signal handling but will break expectations in all other cases when a mutex locking function is supposed to wait on a mutex already locked by some other thread.
    
    It need further thinking (and taking into account threading subsystem on Windows) as Tcl mutex API hides platform details from the programmer.
    
    
  2. login: "flatworm"
  3. mimetype: "text/plain"
  4. username: "flatworm"