SourceForge has been redesigned. Learn more.

#138 Tcl_AsyncMark doesn't appear to wake the notifier under UNIX

obsolete: 8.2.1

OriginalBugID: 3423 RFE
Version: 8.2.1
SubmitDate: '1999-11-05'
LastModified: '2000-04-04'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 3862 4826
OS: Windows NT
OSVersion: 5.00.2128
FixedDate: '2000-10-25'
ClosedDate: '2000-04-04'

David Gravereaux

Could someone verify this?

TclpAsyncMark is #define'd out in tclUnixPort.h and thus has no way to awake select() in Tcl_WaitForEvents (should the notifier be blocked). I can't verify that this is true as I only spotted it reading the source and don't program for unix.

If this is true, I was wondering if a TclpAsyncMark could be added that would generate a proper signal to awake the blocking select?


  • Brent B. Welch

    Brent B. Welch - 2000-10-26
    • priority: 5 --> 2
    • status: open --> closed-fixed
  • Don Porter

    Don Porter - 2001-04-13
    • labels: 104246 --> 04. Async Events
  • Nobody/Anonymous

    Logged In: NO

    Has this bug been fixed? If so, what release.

  • Dave Thomas

    Dave Thomas - 2001-12-04

    Logged In: YES

    We have been using a work-around for this bug for a couple
    of years now. On unix, the notifier is not awakened by a
    Tcl_AsyncMark if it's blocked in a select statement. For
    example, if the application is driven by socket events,
    events posted using Tcl_AsyncMark won't be executed until
    the next socket readable event occurs.

    So on unix, we always do a dummy write to a socket that
    we've bound a "dummy" handler. The handler simply reads
    the socket and returns, but then the notifier processes
    the "real" event that we posted via Tcl_AsyncMark.

    But this work around DOUBLES, the number of socket events
    that would otherwise need to be handled.

    We're still using 8.3.0. I can find no indication that
    this bug has been fixed in later releases. What is the
    status? Is there a fix or patch?


    Dave Thomas

  • David Gravereaux

    Logged In: YES

    This is fixed in 8.4a2+ (around august 2000) and was also
    merged down to 8.3.4 (around august 2001).