# config

name: css
value:
  body {
      margin: 0 auto;
      min-width: 800px;
      padding: 0px 20px;
      background-color: white;
      font-family: sans-serif;
      font-size:14pt;
      -moz-text-size-adjust: none;
      -webkit-text-size-adjust: none;
      -mx-text-size-adjust: none;
  }

  a {
      color: #4183C4;
      text-decoration: none;
  }
  a:hover {
      color: #4183C4;
      text-decoration: underline;
  }

  hr {
      color: #eee;
  }

  .title {
      color: #4183C4;
      float:left;
      padding-top: 30px;
      padding-bottom: 10px;
  }
  .title h1 {
      display:inline;
  }
  .title h1:after {
      content: " / ";
      color: #777;
      font-weight: normal;
  }

  .content h1 {
      font-size: 1.25em;
  }
  .content h2 {
      font-size: 1.15em;
  }
  .content h3 {
      font-size: 1.05em;
      font-weight: bold;
  }

  .section {
      font-size: 1em;
      font-weight: bold;
      background-color: #f5f5f5;
      border: 1px solid #d8d8d8;
      border-radius: 3px 3px 0 0;
      padding: 9px 10px 10px;
      margin: 10px 0;
  }

  .sectionmenu {
      border: 1px solid #d8d8d8;
      border-radius: 0 0 3px 3px;
      border-top: 0;
      margin-top: -10px;
      margin-bottom: 10px;
      padding: 10px;
  }
  .sectionmenu a {
      display: inline-block;
      margin-right: 1em;
  }

  .status {
      float:right;
      font-size:.7em;
      padding-top:50px;
  }

  .mainmenu {
      font-size:.8em;
      clear:both;
      padding:10px;
      background:#eaeaea linear-gradient(#fafafa, #eaeaea) repeat-x;
      border:1px solid #eaeaea;
      border-radius:5px;
  }

  .mainmenu a {
      padding: 10px 20px;
      text-decoration:none;
      color: #777;
      border-right:1px solid #eaeaea;
  }
  .mainmenu a.active,
  .mainmenu a:hover {
      color: #000;
      border-bottom:2px solid #D26911;
  }

  .submenu {
      font-size: .7em;
      margin-top: 10px;
      padding: 10px;
      border-bottom: 1px solid #ccc;
  }

  .submenu a, .submenu label {
      padding: 10px 11px;
      text-decoration:none;
      color: #777;
  }

  .submenu a:hover, .submenu label:hover {
      padding: 6px 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      color: #000;
  }

  .content {
      padding-top: 10px;
      font-size:.8em;
      color: #444;
  }

  .udiff, .sbsdiff {
      font-size: .85em !important;
      overflow: auto;
      border: 1px solid #ccc;
      border-radius: 5px;
  }
  .content blockquote {
      padding: 0 15px;
  }

  table.report {
      cursor: auto;
      border-radius: 5px;
      border: 1px solid #ccc;
      margin: 1em 0;
  }
  .report td, .report th {
     border: 0;
     font-size: .8em;
     padding: 10px;
  }
  .report td:first-child {
      border-top-left-radius: 5px;
  }
  .report tbody tr:last-child td:first-child {
      border-bottom-left-radius: 5px;
  }
  .report td:last-child {
      border-top-right-radius: 5px;
  }
  .report tbody tr:last-child {
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;
  }
  .report tbody tr:last-child td:last-child {
      border-bottom-right-radius: 5px;
  }
  .report th {
      cursor: pointer;
  }
  .report thead+tbody tr:hover {
      background-color: #f5f9fc !important;
  }

  td.tktDspLabel {
      width: 70px;
      text-align: right;
      overflow: hidden;
  }
  td.tktDspValue {
      text-align: left;
      vertical-align: top;
      background-color: #f8f8f8;
      border: 1px solid #ccc;
  }
  td.tktDspValue pre {
      white-space: pre-wrap;
  }

  span.timelineDetail {
      font-size: 90%;
  }

  .footer {
      border-top: 1px solid #ccc;
      padding: 10px;
      font-size:.7em;
      margin-top: 10px;
      color: #ccc;
  }
  div.timelineDate {
      font-weight: bold;
      white-space: nowrap;
  }
  span.submenuctrl, span.submenuctrl input, select.submenuctrl {
    color: #777;
  }


name: header
value:
  <div class="header">
    <div class="title"><h1>$<project_name></h1>$<title></div>
      <div class="status"><th1>
   if {[info exists login]} {
     html "$login — <a href='$home/login'>Logout</a>\n"
   } else {
     html "<a href='$home/login'>Login</a>\n"
   }
      </th1></div>
  </div>
  <div class="mainmenu">
  <th1>
  proc menulink {url name} {
    upvar current_page current
    upvar home home
    if {[string range $url 0 [string length $current]] eq "/$current"} {
      html "<a href='$home$url' class='active'>$name</a>\n"
    } else {
      html "<a href='$home$url'>$name</a>\n"
    }
  }
  html "<a href='//core.tcl.tk'>Core <img src='//core.tcl.tk/images/ext.png'></a>"
  menulink $index_page Home
  if {[anycap jor]} {
    menulink /timeline Timeline
  }
  if {[hascap oh]} {
    menulink /dir?ci=tip Files
  }
  if {[hascap o]} {
    menulink  /brlist Branches
    menulink  /taglist Tags
  }
  if {[hascap r]} {
    menulink /ticket Tickets
  }
  if {[hascap j]} {
    menulink /wiki Wiki
  }
  if {[hascap s]} {
    menulink /setup Admin
  } elseif {[hascap a]} {
    menulink /setup_ulist Users
  }
  </th1></div>


name: footer
value:
  <div class="footer">
  This page was generated in about
  <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
  Fossil $release_version $manifest_version $manifest_date
  </div>


name: details
value:
  timeline-arrowheads:        1
  timeline-circle-nodes:      1
  timeline-color-graph-lines: 1
  white-foreground:           0


name: adunit
value:
  <div style="width: 640px; margin: 12px auto;">
    <img style="float: left; width: 32px; height: 32px; padding-right: 10px;"
         src="https://avatars3.githubusercontent.com/u/319421?v=3&s=200">
    <a href="https://github.com/flightaware/Tcl-bounties">Bounty program</a>
    for improvements to Tcl and certain Tcl packages.
  </div>
  <div style="width: 640px; margin: 12px auto;">
    <a href="https://www.tcl.tk/community/tcl2019/">Tcl 2019 Conference,
  Houston/TX, US, Nov 4-8</a><br>
    Send your abstracts to <a href="mailto:tclconference@googlegroups.com">
  tclconference@googlegroups.com</a><br> or submit via the
  <a href="http://tcl.tk/community/tcl2019/submit_form.html">online form</a>
  by Sep 9.
  </div>


name: ticket-table
value:
  -- single value fields, most current only
  CREATE TABLE ticket(
      -- Do not change any column that begins with tkt_
      tkt_id    INTEGER PRIMARY KEY,
      tkt_uuid  TEXT UNIQUE,
      tkt_mtime DATE,
      tkt_ctime DATE,

      -- Add as many fields as required below this line
      type            TEXT, -- Tracker
      status          TEXT, -- Primary workflow
      resolution      TEXT, -- Secondary workflow
      subsystem       TEXT, -- Functional module
      priority        TEXT, 
      severity        TEXT, 
      foundin         TEXT, -- Version issue was found in
      private_contact TEXT, 
      title           TEXT, -- summary description
      comment         TEXT, -- description
      cmimetype       TEXT, -- format of description
      submitter       TEXT, -- ticket creator
      assignee        TEXT, -- developer currently handling the ticket
      closer          TEXT, -- developer who closed the ticket, if closed
      closedate       TEXT, -- when the ticket got closed
      is_private	    INTEGER
  );
  -- listified ticket fields
  CREATE TABLE ticketchng(
      -- Do not change any column that begins with tkt_
      tkt_id    INTEGER REFERENCES ticket,
      tkt_rid   INTEGER REFERENCES blob,
      tkt_mtime DATE,
     			 			 			 
      -- Add as many fields as required below this line
      login    TEXT,
      username TEXT,
      mimetype TEXT,
      icomment TEXT
  );
  CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime);


name: ticket-common
value:
  # -*- tcl -*-
  # Fixed priorities, matching SourceForge
  set priority_choices {
      {1 Zero}
      2
      {3 Low}
      4
      {5 Medium}
      6
      {7 High}
      8
      {9 Immediate}
  }

  # Fixed resolutions, matching SourceForge
  set resolution_choices {
      None
      Fixed
      Accepted
      Rejected
      Later
      {Works For Me}
      Invalid
      Duplicate
      {Out of Date}
      Postponed
      Remind
      {Wont Fix}
  }

  # Fixed stati, matching SourceForge
  set status_choices {
      Open
      Pending
      Closed
      Deleted
  }

  # Fixed severities, matching Fossil standard.
  set severity_choices {
      Minor
      Critical
      Severe
      Important
      Cosmetic
  }

  # Dynamic: Developers to assign tickets are taken from the repository
  # user base.
  set assignee_choices {
      aku dgp dkf drh ferrieux fvogel gahr hoehlmann hypnotoad jan.nijtmans jhobbs kevin_walzer mistachkin nobody oehhar patthoyts sebres steveb stever stwo twylite vasiljevic wiede
  }
  # Note: The query below is rejected by the report_query_authorizer.
  # Table user is not readable in reports and render scripts.
  if 0 {query {
      SELECT login AS xxperson
      FROM   user
      WHERE  length (pw) > 0
  } {
      lappend assignee_choices $xxperson
  }}

  # Dynamic fixed, possible trackers
  set type_choices {
      Bug Support Patch RFE
  }

  # Dynamic fixed, possible categories, functional modules
  set subsystem_choices {
      {- New Builtin Commands}
      {- New Builtin Object Types}
      {- New Stub Entries}
      {80. Thread Package}
      {None}
  }


name: ticket-newpage
value:
  <th1>
  if {![info exists mutype]} {set mutype {[links only]}}
  if {[info exists submit]} {
      set status     Open
      set resolution None
      set priority   {5 Medium}
      set assignee   nobody
      set closer     nobody
      set is_private 0
      set submitter  $login

      if {$mutype eq "HTML"} {
  	set cmimetype "text/html"
      } elseif {$mutype eq "Wiki"} {
  	set cmimetype "text/x-fossil-wiki"
      } else {
  	set cmimetype "text/plain"
      }
      submit_ticket
      set preview 1
  }
  </th1>
  <h1 style="text-align: center;">Enter A New Ticket</h1>

  <table cellpadding="5">
  <tr>
      <td align="right">Summary:</td>
      <td align="left" ><input type="text" name="title" size="60" value="$<title>"/></td>
      <td align="left" >Enter a one-line summary of the ticket.</td>
  </tr>
  <tr>
      <td align="right">Type:</td>
      <td align="left" ><th1>combobox type $type_choices 1</th1></td>
      <td align="left" >What type of ticket is this?</td>
  </tr>
  <tr>
      <td align="right">Version:</td>
      <td align="left" ><input type="text" name="foundin" size="20" value="$<foundin>" /></td>
      <td align="left" >In what version or build number do you observe the
                        problem?</td>
  </tr>
  <tr>
      <td align="right">Category:</td>
      <td align="left" ><th1>combobox subsystem $subsystem_choices 1</th1></td>
      <td align="left" >Roughly where do you see the problem?</td>
  </tr>
  <tr>
      <td align="right">Severity:</td>
      <td align="left" ><th1>combobox severity $severity_choices 1</th1></td>
      <td align="left" >How debilitating is the problem?  How badly does the
                        problem affect the operation of the product?</td>
  </tr>
  <tr>
      <td align="right">EMail:</td>
      <td align="left" ><input type="text" name="private_contact" value="$<private_contact>" size="30" /></td>
      <td align="left" ><u>Not publicly visible</u> Used by developers to
                        contact you with questions.</td>
  </tr>

  <tr><td colspan="3">
  Enter a detailed description of the problem.
  For code defects, be sure to provide details
  on exactly how the problem can be reproduced.
  Provide as much detail as possible.
  <br/>Format:
  <th1>combobox mutype {{Plain Text} HTML Wiki} 1</th1>
  <br/>
  <th1>set nline [linecount $comment 50 10]</th1>
  <textarea name="comment" cols="80" rows="$nline"
  wrap="virtual" class="wikiedit">$<comment></textarea><br/>
  </td></tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="3">
  Description Preview:<br /><hr />
  <th1>
  if {$mutype eq "Wiki"} {
      wiki $comment
  } elseif {$mutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]\n</verbatim-$r>"
  } else { # HTML
      wiki "<nowiki>$comment\n</nowiki>"
  }
  </th1>
  <hr /></td></tr>
  <th1>enable_output 1</th1>

  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="preview" value="Preview" /></td>
      <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="submit" value="Submit" /></td>
      <td align="left">After filling in the information above, press this button
                       to create the new ticket</td>
  </tr>
  <th1>enable_output 1</th1>

  <tr>
      <td>&nbsp;</td>
      <td align="left"><input type="submit" name="cancel" value="Cancel" /></td>
      <td>Abandon and forget this ticket</td>
  </tr>
  </table>


name: ticket-viewpage
value:
  <th1>
  set alwaysPlaintext [info exists plaintext]
  query {SELECT datetime ($tkt_ctime) AS tkt_cdatetime} {}
  query {SELECT datetime ($closedate) AS fmt_closedate} {}
  query {SELECT rtrim($tkt_uuid,'f')  AS tkt_uuidtrim}  {}
  </th1>

  <table cellpadding="5">
  <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
  <th1>
  if {[hascap s]} {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim ($tkt_id)</td>\n"
  } else {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim</td>\n"
  }
  </th1>
  </tr>
  <tr>
      <td class="tktDspLabel">Title:</td>
      <td class="tktDspValue" colspan="3">$<title></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Type:</td>
      <td class="tktDspValue">$<type></td>
      <td class="tktDspLabel">Version:</td>
      <td class="tktDspValue">$<foundin></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Submitter:</td>
      <td class="tktDspValue">$<submitter></td>
      <td class="tktDspLabel">Created&nbsp;on:</td>
      <td class="tktDspValue">$<tkt_cdatetime></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Subsystem:</td>
      <td class="tktDspValue">$<subsystem></td>
      <td class="tktDspLabel">Assigned&nbsp;To:</td>
      <td class="tktDspValue">$<assignee></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Priority:</td>
      <td class="tktDspValue">$<priority></td>
      <td class="tktDspLabel">Severity:</td>
      <td class="tktDspValue">$<severity></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Status:</td>
      <td class="tktDspValue">$<status></td>
      <td class="tktDspLabel">Last&nbsp;Modified:</td>
      <td class="tktDspValue">$<tkt_datetime></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Resolution:</td>
      <td class="tktDspValue">$<resolution></td>
      <td class="tktDspLabel">Closed&nbsp;By:</td>
      <td class="tktDspValue">$<closer></td>
  </tr>
  <tr>
  <th1>enable_output [hascap e]</th1>
      <td class="tktDspLabel">Contact:</td>
      <td class="tktDspValue">$<private_contact></td>
  <th1>enable_output [expr {![hascap e]}]</th1>
      <td class="tktDspLabel">&nbsp;</td>
      <td class="tktDspValue">&nbsp;</td>
  <th1>enable_output 1</th1>
      <td class="tktDspLabel">Closed&nbsp;on:</td>
      <td class="tktDspValue">$<fmt_closedate></td>
  </tr>

  <th1>
  if {[info exists comment] && [string length $comment]>10} {
    html {
      <tr><td class="tktDspLabel" valign=top>Description:</td>
          <td colspan="4" class="tktDspValue">
    }
    # plaintext vs. formatted
    # mimetypes: text/plain, text/html, text/x-fossil-wiki
    #            NOT USED: text/x-fossil-plain
    if {$alwaysPlaintext} {
      set r [randhex]
      if {$cmimetype ne "text/plain"} {html "([htmlize $cmimetype])\n"}
      wiki "<verbatim-$r>[string trimright $comment]</verbatim-$r>\n"
    } elseif {$cmimetype eq "text/plain"} {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]</verbatim-$r>\n"
    } elseif {$cmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $comment]\n</p>\n"
    } elseif {$cmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $comment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $comment]</verbatim-$r>\n"
    }
    html {</tr>}
  }
  </th1>

  <th1>
  set seenRow 0
  query {
      SELECT datetime(tkt_mtime) AS xdate,
             login               AS xlogin,
             mimetype            AS xmimetype,
  	   icomment            AS xcomment,
             username            AS xusername
      FROM  ticketchng
      WHERE tkt_id = $tkt_id
      AND   length(icomment) > 0
      ORDER BY tkt_mtime DESC
  } {
    if {$seenRow} {
      html "<hr>\n"
    } else {
      html "<tr><td class='tktDspLabel' valign='top'>User Comments:</td>\n"
      html "    <td colspan='4' class='tktDspValue'>\n"
      set seenRow 1
    }
    if {[info exists showfields]} {
      html "<ul><p>date=$xdate<br>login=$xlogin<br>user=$xusername<br>mime=$xmimetype<br>comment=$xcomment</p></ul>"
    }
    html "[htmlize $xlogin]"
    if {$xlogin ne $xusername && [string length $xusername]>0} {
      html " (claiming to be [htmlize $xusername])"
    }
    html " added on $xdate:\n"
    if {$alwaysPlaintext || $xmimetype eq "text/plain"} {
      set r [randhex]
      if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"}
      wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n"
    } elseif {$xmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $xcomment]\n</p>\n"
    } elseif {$xmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n"
    }
  }
  if {$seenRow} {html "</td></tr>\n"}
  </th1>
  </table>


name: ticket-editpage
value:
  <th1>
  query {SELECT datetime ($tkt_ctime) AS tkt_cdatetime} {}
  query {SELECT datetime ($closedate) AS fmt_closedate} {}
  query {SELECT rtrim($tkt_uuid,'f')  AS tkt_uuidtrim}  {}

  if {![info exists mutype]}   {set mutype {Plain Text}}
  if {![info exists icomment]} {set icomment {}}
  if {![info exists username]} {set username $login}

  if {![info exists cmutype]} {set cmutype {Plain Text}}
  if {![info exists comment]} {set comment {}}

  if {[info exists submit]} {
      if {$mutype eq "Wiki"} {
  	set mimetype text/x-fossil-wiki
      } elseif {$mutype eq "HTML"} {
  	set mimetype text/html
      } elseif {$mutype eq {[links only]}} {
  	set mimetype text/x-fossil-plain
      } else {
  	set mimetype text/plain
      }
      if {$status eq "Closed" || $status eq "Deleted"} {
  	set closer $login
  	query {SELECT julianday('now') AS closedate} {}
      } else {
  	set closer nobody
  	unset closedate
      }

      submit_ticket
      set preview 1
  }
  </th1>

  <table cellpadding="5">
  <tr><td class="tktDspLabel">Ticket&nbsp;UUID:</td>
  <th1>
  if {[hascap s]} {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim ($tkt_id)</td>\n"
  } else {
      html "<td class='tktDspValue' colspan='3'>$tkt_uuidtrim</td>\n"
  }
  </th1>
  </tr>
  <tr>
      <td align="right">Title:</td>
      <td align="left" colspan="3"><input type="text" name="title" value="$<title>" size="60" /></td>
  </tr>
  <tr>
  <tr>
      <td align="right">Type:</td>
      <td align="left" ><th1>combobox type $type_choices 1</th1></td>
      <td align="right">Version:</td>
      <td align="left" ><input type="text" name="foundin" size="50" value="$<foundin>" /></td>
  </tr>
  <tr>
      <td class="tktDspLabel">Submitter:</td>
      <td class="tktDspValue">$<submitter></td>
      <td class="tktDspLabel">Created&nbsp;on:</td>
      <td class="tktDspValue">$<tkt_cdatetime></td>
  </tr>
  <tr>
      <td align="right">Subsystem:</td>
      <td align="left"><th1>combobox subsystem $subsystem_choices 1</th1></td>
      <td align="right">Assigned&nbsp;To:</td>
      <td align="left" ><th1>combobox assignee $assignee_choices 1</th1></td>
  </tr>
  <tr>
      <td align="right">Priority:</td>
      <td align="left" ><th1>combobox priority $priority_choices 1</th1></td>
      <td align="right">Severity:</td>
      <td align="left" ><th1>combobox severity $severity_choices 1</th1></td>
  </tr>
  <tr>
      <td align="right">Status:</td>
      <td align="left" ><th1>combobox status $status_choices 1</th1></td>
      <td class="tktDspLabel">Last&nbsp;Modified:</td>
      <td class="tktDspValue">$<tkt_datetime></td>
  </tr>
  <tr>
      <td align="right">Resolution:</td>
      <td align="left" ><th1>combobox resolution $resolution_choices 1</th1></td>
      <td class="tktDspLabel">Closed&nbsp;By:</td>
      <td class="tktDspValue">$<closer></td>
  </tr>
  <tr>
  <th1>enable_output [hascap e]</th1>
      <td align="right">Contact:</td>
      <td><input type="text" name="private_contact" size="40" value="$<private_contact>" /></td>
  <th1>enable_output [expr {![hascap e]}]</th1>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
  <th1>enable_output 1</th1>
      <td class="tktDspLabel">Closed&nbsp;on:</td>
      <td class="tktDspValue">$<fmt_closedate></td>
  </tr>
  <tr>
      <td align="right">Description:</td>
      <td align="left" colspan="3"><th1>combobox cmutype {{Plain Text} HTML Wiki} 1</th1>:</td>
  </tr>
  <tr>
      <td>&nbsp;</td>
      <td align="left"  colspan="4">
          <th1>set nline [linecount $comment 50 10]</th1>
          <textarea name="comment" cols="80" rows="$nline" wrap="virtual" class="wikiedit">$<comment></textarea>
      </td>
  </tr>
  <tr>
      <td>&nbsp;</td>
      <td colspan="2">Append Remark with format
          <th1>combobox mutype {{Plain Text} HTML Wiki} 1</th1>
          from
          <input type="text" name="username" value="$<username>" size="30" />:
          <br />
          <textarea name="icomment" cols="80" rows="15" wrap="virtual" class="wikiedit">$<icomment></textarea>
      </td>
  </tr>

  <th1>enable_output [info exists preview]</th1>
  <tr><td colspan="2">
  Description Preview:<br><hr>
  <th1>
  if {$cmutype eq "Wiki"} {
      wiki $comment
  } elseif {$cmutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r>\n[string trimright $comment]\n</verbatim-$r>"
  } else {
      wiki "<nowiki>\n[string trimright $comment]\n</nowiki>"
  }
  </th1>
  <hr>
  </td></tr>
  <tr><td colspan="2">
  Comment Preview:<br><hr>
  <th1>
  if {$mutype eq "Wiki"} {
      wiki $icomment
  } elseif {$mutype eq "Plain Text"} {
      set r [randhex]
      wiki "<verbatim-$r>\n[string trimright $icomment]\n</verbatim-$r>"
  } else {
      wiki "<nowiki>\n[string trimright $icomment]\n</nowiki>"
  }
  </th1>
  <hr>
  </td></tr>
  <th1>enable_output 1</th1>

  <tr>
  <td align="right">
  <input type="submit" name="preview" value="Preview" />
  </td>
  <td align="left">See how the description will appear after formatting.</td>
  </tr>

  <th1>enable_output 1</th1>
  <tr>
  <td align="right">
  <input type="submit" name="submit" value="Submit" />
  </td>
  <td align="left">Apply the changes shown above</td>
  </tr>
  <th1>enable_output 1</th1>

  <tr>
  <td align="right">
  <input type="submit" name="cancel" value="Cancel" />
  </td>
  <td>Abandon this edit</td>
  </tr>
  <th1>
  set seenRow 0
  query {
      SELECT datetime(tkt_mtime) AS xdate,
             login               AS xlogin,
             mimetype            AS xmimetype,
  	   icomment            AS xcomment,
             username            AS xusername
      FROM  ticketchng
      WHERE tkt_id = $tkt_id
      AND   length(icomment) > 0
      ORDER BY tkt_mtime DESC
  } {
    if {$seenRow} {
      html "<hr>\n"
    } else {
      html "<tr><td class='tktDspLabel' valign='top'>User Comments:</td>\n"
      html "    <td colspan='3' class='tktDspValue'>\n"
      set seenRow 1
    }
    if {[info exists showfields]} {
      html "<ul><p>date=$xdate<br>login=$xlogin<br>user=$xusername<br>mime=$xmimetype<br>comment=$xcomment</p></ul>"
    }
    html "[htmlize $xlogin]"
    if {$xlogin ne $xusername && [string length $xusername]>0} {
      html " (claiming to be [htmlize $xusername])"
    }
    html " added on $xdate:\n"
    if {$xmimetype eq "text/plain"} {
      set r [randhex]
      wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n"
    } elseif {$xmimetype eq "text/x-fossil-wiki"} {
      wiki "<p>\n[string trimright $xcomment]\n</p>\n"
    } elseif {$xmimetype eq "text/html"} {
      wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n"
    } else {
      set r [randhex]
      wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n"
    }
  }
  if {$seenRow} {html "</td></tr>\n"}
  </th1>
  </table>


name: ticket-reportlist
value:
  <th1>
  if {[hascap n]} {
      html "<p>Enter a new ticket:</p>"
      html "<ul><li><a href='tktnew'>New ticket</a></li></ul>"
  }
  </th1>

  <p>Choose a report format from the following list:</p>
  <ol>
  <th1>html $report_items</th1>
  </ol>

  <th1>
  if {[hascap t q]} {
      html "<p>Other options:</p>\n<ul>\n"
      if {[hascap t]} {
          html "<li><a href='rptnew'>New report format</a></li>\n"
      }
      if {[hascap q]} {
          html "<li><a href='modreq'>Tend to pending moderation requests</a></li>\n"
      }
  }
  </th1>


name: ticket-report-template
value:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE                       '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket


# reportfmt

owner: ticket-master
title: All Tickets
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket


owner: ticket-master
title: All Open By Category
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY subsystem, tkt_mtime DESC


owner: ticket-master
title: All Open By Type
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY type, tkt_mtime DESC


owner: ticket-master
title: All Open
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Most Stale
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status NOT IN ('Closed', 'Deleted')
  ORDER BY tkt_mtime
  LIMIT 50


owner: ticket-master
title: Pending Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  resolution            AS 'Resolution',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Pending'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Recently Changed
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE '#ffffff'
  END AS 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  ORDER BY tkt_mtime DESC
  LIMIT 50


owner: ticket-master
title: Open Bug Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Bug'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open Support Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Support'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open Patch Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'Patch'
  ORDER BY tkt_mtime DESC


owner: ticket-master
title: Open RFE Tickets
sqlcode:
  SELECT
  substr(tkt_uuid,1,10) AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE status = 'Open'
  AND   type   = 'RFE'
  ORDER BY tkt_mtime DESC


owner: aku
title: Bugs-Open-Prio-Changed
cols:
  #ffffff Key:
  #f2dcdc prio9
  #e8e8bd prio8
  #cfe8bd prio7
  #cacae5 prio6
  #c8c8c8 prio5-

sqlcode:
  SELECT
  CASE WHEN priority LIKE '9%' THEN '#f2dcdc'
         WHEN priority LIKE '8%' THEN '#e8e8bd'
         WHEN priority LIKE '7%' THEN '#cfe8bd'
         WHEN priority LIKE '6%' THEN '#cacae5'
         ELSE '#c8c8c8' END as 'bgcolor',
  substr(tkt_uuid,1,10) AS '#',
  priority              AS 'Prio',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary',
  datetime(tkt_mtime)   AS 'Last Changed',
  submitter             AS 'Submitter',
  assignee              AS 'Assignee'
  FROM ticket
  WHERE status = 'Open' AND type = 'Bug'
  ORDER BY priority DESC,tkt_mtime DESC


owner: sebres
title: All tickets involved me
cols:
  #ffffff Key:
  #f2dcdc Open
  #bde5d6 Deleted
  #cacae5 Pending
  #c8c8c8 Closed

sqlcode:
  SELECT
  CASE WHEN status='Open'    THEN '#f2dcdc'
       WHEN status='Deleted' THEN '#bde5d6'
       WHEN status='Pending' THEN '#cacae5'
       WHEN status='Closed'  THEN '#c8c8c8'
       ELSE                       '#ffffff'
  END AS 'bgcolor',
  rtrim(substr(tkt_uuid,1,10),'f') AS '#',
  datetime(tkt_mtime)   AS 'Last Changed',
  submitter             AS 'Submit',
  type                  AS 'Type',
  status                AS 'Status',
  subsystem             AS 'Subsystem',
  title                 AS 'Summary'
  FROM ticket
  WHERE submitter = $login OR assignee = $login 
  -- OR instr(comment, $login) > 0
  OR tkt_id in (
    SELECT tkt_id FROM ticketchng WHERE login = $login OR username = $login
  )
  ORDER BY tkt_mtime DESC


# event

type: ci
user: welch
comment:
  Moved these into their own "vc" directory.  These are not used for
  the standard TEA builds, but might be useful to others.


type: ci
user: welch
comment:
  Added Tcl_CreateThreadType and TCL_RETURN_THREAD_TYPE
  macros for declaring the NewThread callback proc.


type: ci
user: kupries
comment:
  2000-05-04  Andreas Kupries <a.kupries@westend.com>

  	* Overall changes:
  	  (1) Added joinable threads.
  	  (2) Added transfer of channels between threads.

  	* generic/threadCmd.c: Added functions Thread_Join and
  	  ThreadJoinObjCmd.

  	  Extended function ThreadCreateObjCmd to handle a
  	  -joinable flag.

  	  Fixed bug in Thread_Create, the argument 'stacksize' was not
  	  used.

  	  Removed declaration of ThreadObjCmd, which was not used anywhere
  	  else in the code.

  	  Added functions Thread_Transfer, ThreadTransferEventProc and
  	  ThreadTransferObjCmd. Extended behaviour of ThreadDeleteEvent
  	  and ThreadExitProc to deal with the new class of events.

  	  Changed usage of ckfree to the more canonical Tcl_Free. Same for
  	  ckalloc and Tcl_Alloc.

  	* Makefile.in: Fixed bug with regard to the installation of
  	  documentation.

  	* doc/thread.*: Added documentation of create -joinable,
  	  thread::join and thread::transfer.

  	* tests/thread.test: Added tests for joining of threads and moving
  	  channels between threads.


type: ci
user: kupries
comment:
  2000-05-09 Andreas Kupries  <a.kupries@westend.com>

  	* tests/thread.test: Removed dependency on aclocals.m4. Using a
  	  real temporary file now, as created by a call to
  	  tcltest::makeFile.


type: ci
user: zoran
comment:
     Summary of changes (zoran@munich.com)

     * Added threadSpCmd.c file with implementation of "thread::mutex"
       and "thread::cond" commands. Documentation and tests are still
       pending.

     * Added threadSvCmd.c file with implementation of "thread::sv_*"
       family of commands modeled after AOLserver nsv_* ones.
       Documentation and tests are still pending.

     * fixed Makefile.in for the two above

     * Added "thread::exists" command to threadCmd.c.
       Updated docs for this new command.

     * Moved most of internal functions in threadCmd.c to statics,
       except the Thread*ObjCmd()

     * Changed behaviour of "thread::exit". It now simply flips the
       bit to signal thread stuck in thread::wait to gracefuly exit.
       As a consequence, command now does not trigger error on thread exit.
       ThreadWait() and ThreadStop() are newly added to support this.
       Also the ThreadSpecificData has one more integer: "stopped"

     * Replaced ref's to obsolete Tcl_GlobalEval() with new Tcl_EvalEx()

     * fixed broken 'thread::create -joinable script';
       was missing initialization of script variable


type: ci
user: davidg
comment:
  2000-08-09  David Gravereaux <davygrvy@ajubasolutions.com>

  	* win/vc/thread.rc: swapped "Scriptics Corp" for "Ajuba
  	Solutions"

  	* win/vc/config.vc:
  	* win/vc/makefile.vc: cleaned-up old cruft.  Added new files
  	from Zoran's patches.  made swapping to MSDev 6.0 easier.
  	Removed the '!if $(_NMAKE_VER) > 162' test for 2 reasons.

  	1) batchmode inference rules are valid since MSDev 5.0 and
  	the core can't be built with less.  So don't bother testing.

  	2) nmake.exe that comes with MSDev 6.0 has a bug with the
  	meaning of that macro and MS decided to use a string instead
  	breaking the integer comparison test.


type: ci
user: davidg
comment:
  Removed the event loop sinking because this extension is only responsible for it's own events in the event loop.


type: ci
user: davidg
comment:
  2000-08-20  David Gravereaux <davygrvy@ajubasolutions.com>

  	* win/vc/config.vc:
  	* win/vc/makefile.vc:
  	* win/vc/README.txt:
  	* win/vc/thread.dsp:  A near top down rewrite that adds
  	four more build configurations.  See README.TXT for the
  	details.

  	* win/vc/.cvsignore:  A few more glob patterns added to match
  	the new build directories.


type: ci
user: davidg
comment:
  OUTDIR macro was being defined on spawning nmake under VC6.  This was having a negative change on the makefile.


type: ci
user: davidg
comment:
  2000-08-21  David Gravereaux <davygrvy@ajubasolutions.com>

  	* generic/threadCmds.c (Thread_Init): Added logic to enable
  	thread::join and thread::transfer when loaded into an 8.4+ core.
  	We don't don't want a seg fault when the Stubs tables don't
  	match.


type: ci
user: davidg
comment:
  2000-08-29  David Gravereaux <davygrvy@ajubasolutions.com>

  	* generic/threadCmd.c (NewThread): Tcl_Init return value wasn't
  	being verified.  Added a check and failure logic to fall-out.
  	[Bug: 5301]


type: ci
user: zoran
comment:
  2000-10-16  Zoran Vasiljevic <zoran@munich.com>

          * generic/threadSvCmd.c ThreadSvUnsetObjCmd(): deadlocked.
          Forgot to release shared-array lock which resulted in
          deadlock after first successful unset of the variable.


type: ci
user: zoran
comment:
  Please ignore the 1.4 checkin. It contained a bug introduced by the deadlock
  fix. This is now corrected. Sorry for inconvenience.


type: ci
user: davidg
comment:
  2000-10-26  David Gravereaux <davygrvy@ajubasolutions.com>

  	* generic/thread.h:
  	* win/vc/config.vc:
  	* win/vc/makefile.vc:
  	* win/vc/thread.dsp: upped version numbers to 2.2 along with adding
  	a new macro (THREAD_VERSION_SUBSET83) defining the version when
  	loaded into an 8.3 core.  Which happens to be "2.1.1" at this time.

  	* generic/threadCmd.c (Thread_Init): Added logic to allow setting
  	the package version at runtime to "2.2" when compiled against 8.4
  	and loaded into 8.4.  When compiled against 8.4, yet loaded into
  	8.3, thread::join and thread::transfer are not added to the interp
  	and the package version is set to "2.1.1" instead from the single
  	binary.  [ie. multiple interfaces in one binary]  When compiled
  	against 8.3, thread::join and thread::transfer are non-existant and
  	the package version is always "2.1.1" to maintain a consistent
  	interface in all combinations (as per discussions with Don Porter).


type: ci
user: davidg
comment:
  2000-11-02  David Gravereaux <davygrvy@ajubasolutions.com>

  	* generic/threadCmd.c (NewThread): Added logic to test for a
  	working Tcl_Init() based on the core version at runtime and ignore
  	its failure in versions 8.3.[1,2] and 8.4a1.  [BUG: 5301]


type: ci
user: davygrvy
comment:
  Added the EXTERN macro for the prototype of Thread_Init which is more
  standard than using DLLEXPORT directly.


type: ci
user: davygrvy
comment:
  2001-04-26  David Gravereaux <davygrvy@pobox.com>

  	* generic/threadCmd.c (ThreadEventProc): ThreadErrorProc now
  	supported in asyncronous sends when Tcl_Eval returns other than
  	TCL_OK.  It silently failed prior to this.


type: ci
user: davygrvy
comment:
  	* win/vc/makefile.vc:
  	* win/vc/thread.dsp: Change NODEBUG macro to be DEBUG instead.
  	Double negatives give me a headache.  DEBUG=1 makes more sense
  	to me than NODEBUG=0.  Not that I didn't think you wouldn't have
  	disagreed it was confusing, no?


type: ci
user: davygrvy
comment:
  	* doc/thread.n:
  	* tests/thread.test: Replaced thread::exit with thread::unwind and
  	documented the change and clarified the subtleties.


type: ci
user: davygrvy
comment:
  	==== INTERFACE CHANGE ====
  	* generic/threadCmd.c:
  	* generic/thread.h: thread::exit renamed to thread::unwind. The
  	name of 'exit' is misleading.  An exit implies an unconditional
  	return.  But there are conditions.  'unwind' describes with more
  	clarity what's happening to the prior thread::wait.  For example:

  	  # parent thread
  	  set T [thread::create {source worker.tcl}]
  	  ....
  	  thread::send -async $T doStuff
  	  ....
  	  thread::send -async $T doStuff
  	  ....
  	  thread::send -async $T thread::unwind

  	  # worker.tcl
  	  proc init    {} {#do initialization}
  	  proc cleanup {} {#do cleanup}
  	  proc doStuff {} {#the work}
  	  init
  	  thread::wait
  	  cleanup

  	When worker.tcl is sourced, the execution stops at thread::wait and
  	the event loop is entered.  When thread::unwind is sent to the worker,
  	thread::wait falls-out and cleanup is called.  The condition for
  	thread::unwind to cause an exit is determined by the script.  If
  	thread::wait was the last Tcl command in the script, yes the thread
  	will exit.  But if thread::wait is not the last, the execution of the
  	script is just continued.  Hence, the name change to clarify this fact.

  	Package version has not been changed.  There hasn't been an official
  	release of 2.2, so it stays.


type: ci
user: davygrvy
comment:
  	* generic/threadCmd.c (NewThread): removed the previous addition of
  	Tcl_FinalizeThread.  Tcl_ExitThread calls it anyways (my mistake).
  	The resource leak was in the core.  See ->
  	http://sourceforge.net/tracker/?func=detail&atid=110894&aid=419683&group_id=10894
  	for the fix.  That patch is pending approval.

  	To acheive the same behavior of emptying the event loop the way
  	thread::wait used to work, use the following:
  		set T [thread::create {thread::unwind; update}]


type: ci
user: davygrvy
comment:
  	* generic/thread.h:
  	* win/vc/makefile.vc:
  	* win/vc/thread.rc:
  	* win/vc/pkg.vc (new): Moved version numbers from the header file.  It isn't
  	an export API or anything.  Moved version numbers to the build files.  I'll
  	modify configure.in and makefile.in a little later.


type: ci
user: davygrvy
comment:
  	* generic/thread.h:
  	* generic/threadCmd.c:  Re-added original implimentation of [thread::exit].
  	for `emergency use only`.  You have been warned ;)


type: ci
user: davygrvy
comment:
  	* generic/thread.h (deleted):
  	* generic/tclThread.h (new):
  	* generic/threadCmd.c:  decided to change the name of 'thread.h' to
  	'tclThread.h', per request.


type: ci
user: davygrvy
comment:
  	* configure.in:
  	* configure:
  	* win/pkg.vc:  Upped version numbers to 2.3 and 2.1.3 because I just cut
  	a release.


type: ci
user: davygrvy
comment:
  	* configure.in:
  	* configure:
  	* win/vc/thread.dsp:
  	* win/vc/pkg.vc:  Upped version numbers to 2.3 and 2.1.3 because I just cut
  	a release.


type: ci
user: vasiljevic
comment:
  Added guessing files. I wonder how anybody succeeded to compile
  the extension sucessfully without those ?


type: ci
user: vasiljevic
comment:
  Added as the part of upcoming 2.4. Those are implementing almost
  complete list command interface to thread shared variables.


type: ci
user: vasiljevic
comment:
  Totally revamped thread shared variable interface. Now use tsv::
  namespace instead of thread::sv_*. It also stores objects instead
  of strings in the shared memory (improved performace on large
  memory-resident shared datastructures.)


type: ci
user: vasiljevic
comment:
  Extended thread::send to allow asynchronous backfiring of scripts.
  Removed thread::kill until settle on the correct behaviour.


type: ci
user: vasiljevic
comment:
  Added missing parts for thread shared variables.
  Added missing parts for sync primitives.
  Corrected thread::errorproc (was totally out of date)
  Added thread::send modifications (optional varname).


type: ci
user: vasiljevic
comment:
  Preparing the move to 2.4.
  cygwin build not tested yet.
  vc++ build not modified. Will leave it to David.


type: ci
user: vasiljevic
comment:
  The older style of thread::sv_* commands is now activated in addition
  to the new style tsv::*. If you want to force the old interface alone,
  comment-out the OLD_COMPAT define at the top of the file


type: ci
user: vasiljevic
comment:
  * generic/threadCmd.c: fixed multiple async reporting of error events
  (thanks Jean-Luc Fontaine for the tip)


type: ci
user: vasiljevic
comment:
  * generic/threadCmd.c: fixed address od the target interpreter when
  doing the callback async script processing. All messages went to the
  main interpreter instead of the selected interpreter, causing process
  to hung when posting callbacks to more that one interp at the same time.
  (thanks Jean-Luc Fontaine for the tip)


type: ci
user: davygrvy
comment:
  Idea for how to do a thread::kill without Tcl_CreateThread saving the handle.
  This can only work on Win2K.  Maybe WinXP, too, dunno.  Code path is
  turned off, so I don't unstablize the HEAD.


type: ci
user: davygrvy
comment:
  A small 'const' qualifier change.  It's a bit more wordy now, but reads a
  little clearer to me.  Unscambling pointer math gives me a headache and
  combined with a cast tends to be dangerous.


type: ci
user: vasiljevic
comment:
  Added facility to hide certain shared array names using HIDE_DOTNAMES.
  Turned on for AOLServer builds per default.


type: ci
user: hobbs
comment:
  	* generic/tclThread.h:
  	* generic/threadCmd.c: added stub voodoo magic to allow building
  	against Tcl 8.3 and still get all the 8.4+ functionality when later
  	loaded into an 8.4+ interp.


type: ci
user: hobbs
comment:
  	* tclconfig/tcl.m4,install-sh (new):
  	* config/* (removed):
  	* aclocal.m4:
  	* configure:
  	* configure.in:
  	* Makefile.in: Updated build system to use tclconfig (TEA 2002)
  	structure.


type: ci
user: hobbs
comment:
  	* Makefile.in (TCLSH_PROG): moved and updated env var definitions
  	to have tclsh work from build dir.  Removed TCL_EXTRA_CFLAGS,
  	TCL_LD_FLAGS, TCL_SHLIB_LD_LIBS, TCL_DBGX, TCL_STUB_LIB_FILE,
  	TCL_STUB_LIB_SPEC as they aren't needed (configure acquires all
  	that info for us).  TCL_LIBS is also not needed, but left in as a
  	reference to the libs Tcl used.


type: ci
user: hobbs
comment:
  	* configure: regen based on updated tclconfig/tcl.m4
  	* configure.in: moved the SHLIB_LD_LIBS magic into
  	tclconfig/tcl.m4 and noted where users can modify (SHLIB_LD_)LIBS.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: BUILD_${PACKAGE} had to be static BUILD_thread in
  	AC_DEFINE because autoconf wasn't substituting ${PACKAGE}.


type: ci
user: hobbs
comment:
  	* Makefile.in (install-lib-binaries): ensure that binary files are
  	installed with executable bit set (use INSTALL_PROGRAM)


type: ci
user: hobbs
comment:
  	* Makefile.in: improved use of DESTDIR in install targets.
  	Removed need for installdirs target.
  	Broke TCLSH_PROG into TCLSH_ENV and TCLSH_PROG with TCLSH var and
  	added comments about TCLSH_ENV.
  	Added default shell and gdb targets.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: updated to new TEA base that: prefixes all macros
  	with TEA_* instead of SC_*; adds TEA_PREFIX, which defaults the
  	prefix and exec_prefix values to what Tcl used; adds
  	TEA_SETUP_COMPILER, which handles basic compiler / support program
  	checks and simplifies the configure.in.  Turn on --enable-threads
  	by default and do sanity checking as well.


type: ci
user: vasiljevic
comment:
  * generic/threadCmd.c: fixed processing of -eventmark. We now
  properly wait for target thread to catch up with processing events.

  CVS ----------------------------------------------------------------------


type: ci
user: vasiljevic
comment:
  Force-initialize new tcl object in LocateContainer() if one cannot be
  found. Without that, some upper-level code wrongly tried to convert
  the (possible invalid) object type, resulting in memory trashing and
  eventually core dumps.


type: ci
user: vasiljevic
comment:
  Fixed some function parameters where Sun's CC was barfing. Strangely,
  the GNU gcc was perfectly satisfied with those ...


type: ci
user: vasiljevic
comment:
  Added some guarding Tcl_ResetResult calls before each
  Tcl_SetXXObj(Tcl_GetObjResult(..) ...) since the object left in
  interp result *may* be shared under circumstances.


type: ci
user: vasiljevic
comment:
  Newly generated configure (autoconf 2.52).
  modified install-doc target in Makefile to install man documentation
  from the doc/man directory (the new home for nroff docs)


type: ci
user: vasiljevic
comment:
  Removed some extra Tcl_ResetResult since it was breaking reporting of
  errorCode and errorInfo variables


type: ci
user: vasiljevic
comment:
  Moved platform specific build stuff from the top-level README to
  the appropriated win/ and unix/ README file.


type: ci
user: mdejong
comment:
  	* README: Fix typo.
  	* doc/man/thread.n: Note that thread::join and
  	thread::transfer are only available with Tcl 8.4.


type: ci
user: vasiljevic
comment:
  fixed "tsv::lpush" to correctly make a copy
  of the object pushed into the list in shared array element


type: ci
user: vasiljevic
comment:
  Fixed Sv_DuplicateObj to properly invalidate duped object string rep
  after successfully duplicating the internal rep.


type: ci
user: hobbs
comment:
  	* configure:
  	* configure.in: move the CFLAGS definition into TEA_ENABLE_SHARED
  	and make it pick up the env CFLAGS at configure time.


type: ci
user: vasiljevic
comment:
  Fixed ListRemoveInner() to recognize
  and ignore already removed tsd thread structures.
  Fixed some invalid TCL_OK returns which masked serious errors.


type: ci
user: vasiljevic
comment:
  Added more macros for locking/unlocking buckets. This was necessary for
  the new tsv::eval mechanism.


type: ci
user: vasiljevic
comment:
  Added first working implementation of the thread pool.
  Tested and verified with purify but no field tests yet.


type: ci
user: vasiljevic
comment:
  Added thread-pool related exports.
  Added SpliceIn and SpliceOut macros for fiddling with linked lists.


type: ci
user: vasiljevic
comment:
  Rewritten with partial event loop processing. Now only the poster
  does not block the event loop. Worker threads are never stuck in
  the event loop; they just wait on the condition variable.
  Alsom idletimer is still not implemented. Lack of Tcl API support
  makes it little bit more complex.


type: ci
user: vasiljevic
comment:
  Added hand-crafted timeout for worker threads. This should be fixed
  when Tcl API gets a Tcl_ConditionWait which returns the cause the
  function has exited.


type: ci
user: vasiljevic
comment:
  Many cosmetic changes in comments. Also, improved error reporting
  in case when the Tcl interpreter cannot be created in the worker thread.


type: ci
user: vasiljevic
comment:
  Fixed memory leak when posting detached jobs.
  Also, removed Tcl_GetTime in favour of the compatibility implementation.


type: ci
user: mdejong
comment:
  	* generic/threadCmd.c (ThreadSendObjCmd):
  	The thread::send command was not working
  	under Win32 because threads that had an id
  	that was a negative number were generating
  	a usage error in the thread::send command.
  	* tests/thread.test: Add test for negative
  	number as thread id.


type: ci
user: vasiljevic
comment:
  Fixed ThreadSetResult to correctly initialize all elements of the
  result structure received from the caller.


type: ci
user: vasiljevic
comment:
  Fixed ListRemoveInner to unconditionaly reset the head of threads
  linked list when the last thread exits.


type: ci
user: vasiljevic
comment:
  Fixed object copy code for generic objects and list object.
  In some cases, we've missed to properly copy list objects
  with zero elements. Also, with 8.4.2, there are some new
  issues fixed concerning path objects.


type: ci
user: vasiljevic
comment:
  Improved calling of exit handlers. We now always supply clientData
  even if we do not use it. This is because some Tcl internal calls
  test the clientdata if avoid calling the callback if clientData is NULL.


type: ci
user: vasiljevic
comment:
  Removed checking of stopped flag during walk of the list of active threads.
  This solves some subtle thread reservation problems with threads marked to
  unwind on error.


type: ci
user: vasiljevic
comment:
  Fixed bug with NULL tsdPTr introduced in ThreadSend by the
  last checkin. Please consider the previous version unusable.


type: ci
user: vasiljevic
comment:
  Added quick fix for autoconf issues related to $srcdir and building
  of the package from the top-level directory instead of unix/win subdir.
  Thanks to Mo DeJong for the fix.


type: ci
user: vasiljevic
comment:
  Added keyed-list implementation borrwoed from the TclX package.
  We made some slight modifications and additions to be able to
  make the implementation stand-alone (exist w/o Tclx) and to
  be able to plugin into our private deep object copier.


type: ci
user: vasiljevic
comment:
  Added persistent store implementation for shared variables. We now have
  a plugin architecture so people may extend with custom-made persistency
  (for example in SQL databases). A working example of GNU gdbm wrapper
  is supplied.


type: ci
user: vasiljevic
comment:
  Adjusted for conditional compilation with gdbm persistent store wrapper.
  Added new files to the make script.


type: ci
user: vasiljevic
comment:
  Regenrated configure script. Modified aolserver.m4 not to compile
  the library as bundle but as a regular shared lib instead.


type: ci
user: vasiljevic
comment:
  Added implementation of the thread::broadcast command.
  This is actually only the convenience wrapper for something that
  may be achieved from the Tcl level by using already existing
  thread::send, thread::id and thread::names commands.
  What the heck.


type: ci
user: vasiljevic
comment:
  Mark all threads created by the package to distinguish them from other
  "foreign" threads created by some other source. This mainly includes
  threads created by the AOLserver when running as AOLserver module.


type: ci
user: vasiljevic
comment:
  Fixed mutex release (was deadlocking) in ThreadSend when refusing to
  send message to the foreign thread


type: ci
user: vasiljevic
comment:
  ThreadList and ThreadExistsInner hide (i.e. do not report) foreign
  threads, like for example, those created by AOLserver


type: ci
user: vasiljevic
comment:
  Removed the concept of foreign threads; still have to find the way
  to avoid broadcasting non-package created threads (like in aolserver)


type: ci
user: vasiljevic
comment:
  Check if we are running at least in 8.3 core or newer.
  If not, simply return w/o loading the package. This fixes behaviour
  of being in the package path of an pre-8 shell.


type: ci
user: vasiljevic
comment:
  Do automatic "package require Ttrace" during ttrace::eval when
  executing the thread::broadcast command. This saves us of explicitily
  doing this command at thread creation.


type: ci
user: vasiljevic
comment:
  Added thanksgiving comment to Jeffrey Hobbs for doing the stubs-voodoo
  so we're able to link with various Tcl versions.


type: ci
user: vasiljevic
comment:
  Rewritten handling of thread handles as passed to Tcl.
  Instead of casting Tcl_ThreadId to unsigned int, which brought some
  problems on Cray machines, we're now generating opaque string-based
  handles and match them to Tcl_ThreadId internally.


type: ci
user: vasiljevic
comment:
  Improved behaviour when destroying locked mutexes and locking the
  same mutex twice from the same thread. In both cases we throw
  Tcl error instead of coring the process or deadlocking the
  (naive) application.


type: ci
user: vasiljevic
comment:
  Corrected namespace prefix for AOLserver 4.x or higher,
  since namespaced commands are now supported.


type: ci
user: vasiljevic
comment:
  Adjusted to fix some package loading issues on AOLserver 4.x.
  Revamped pool and thread handles to match tpool<number> and tid<number>
  respectively. This should correct issues with handles found on Crays.


type: ci
user: vasiljevic
comment:
  Revamped thread and tpool handles once more, after correcting the
  real cause of bad thread handles on some 64-bit machines in Tcl core.


type: ci
user: andreas_kupries
comment:
  	* generic/threadCmd.c (ThreadErrorProc): Added code to explicitly
  	  initialize the field 'interp' in ThreadSendData. This was ok
  	  (NULL) for a regular build, but when build with symbols the
  	  guard pattern forced a crash in test thread-16.2.

  	* tests/thread.test: Duplicate test id thread-16.1 renamed to
  	  thread-16.2.


type: ci
user: andreas_kupries
comment:
  	* generic/threadSvCmd.c: Added a prototype for
  	  SvObjDispatchObjCmd. Prevented compilation of debug variant on
  	  Windows due to warning as error.

  	* tests/thread.test: Added more tests transfering channels between
  	  threads for in-core drivers.


type: ci
user: andreas_kupries
comment:
  	* tests/thread.test: Added two tests checking the working of
  	  fileevents after a pipe channel has been transfered. The second
  	  has to fail for any core where TIP #218 is not applied, because
  	  the incoming alert is directed to the wrong thread for event
  	  processing.


type: ci
user: vasiljevic
comment:
  All tests regarding channel transfer between threads are now skipped
  for Windows until the core handles this correctly


type: ci
user: vasiljevic
comment:
  o. Adjusted for TEA3 and rebuild with autoconf 2.59
  o. Removed extra handling for Tcl 8.3
     tests/thread.tcl: since we do not support 8.3 any more
  o. Updated docs for the 2.6 release


type: ci
user: vasiljevic
comment:
  changed ttrace::addtrace: it now recognises if the tracing is enabled and
  activates the tracer procedure immediately.
  Added ttrace::isenabled: can be called to check wether the tracing is
  enabled or not.


type: ci
user: vasiljevic
comment:
  Fixed Tcl Bug #1095370. The -minworkers value is now honoured when
  a idle worker exits due to the -idletime timer expiry.


type: ci
user: vasiljevic
comment:
  Fixed Sv_PutContainer which released the container lock too early
  resulting in possible access to already freed container and thus
  to process exitus.


type: ci
user: vasiljevic
comment:
  The ttrace::enable can be called recursively.
  Improved script generation for namespaced variables.
  The overloaded [info] now does the right thing when called on procedures
  which were still not loaded from the ttrace store.


type: ci
user: hobbs
comment:
  	* Makefile.in (AR): use @AR@
  	(TCLSH_ENV): add TCL_THREAD_LIBRARY var
  	* pkgIndex.tcl.in: grok TCL_THREAD_LIBRARY var


type: ci
user: vasiljevic
comment:
  Reverted some temporary changes which do not belong there and were used
  for some internal testing (go tchecked in by mistake)


type: ci
user: mdejong
comment:
  	* Makefile.in: Subst TCLSH_PROG as SYSTEM_TCLSH
  	and subst BUILD_TCLSH and BUILD_TCLSH_PROG.
  	* configure: Regen.
  	* configure.in: Invoke TEA_BUILD_TCLSH from
  	tcl.m4 to correctly determine BUILD_TCLSH.


type: ci
user: mdejong
comment:
  	* Makefile.in: Remove SYSTEM_TCLSH and any
  	code that tries to run tclsh at build time
  	aside from running the test cases.
  	* configure: Regen.
  	* configure.in: Remove calls to TEA_BUILD_TCLSH
  	and TEA_BUILD_WISH since these were removed
  	from tcl.m4. This fixes up the build when
  	--with-tcl indicates either a build dir or
  	and install dir.


type: ci
user: vasiljevic
comment:
  ThreadDetach sets the both source and target thread ID's for the
  detached channel to zero, thus signalizing the cleanup code to
  leave the channel in the list when the thread who detached it exits.


type: ci
user: vasiljevic
comment:
  Added ThreadCutChannel utility proc to cut out the channel from
  thread/interp and clean pending channel events from the event queue.


type: ci
user: vasiljevic
comment:
  Revamped handling because of the deep
  race condition which resulted in
  deadlocks when using exclusive mutexes.


type: ci
user: vasiljevic
comment:
  Fixed race condition when testing constraints
  (mutex being locked by the caller thread) when
  waiting on the condition variable. Also, fixed
  exclusive mutex ownership and usage counting.


type: ci
user: hobbs
comment:
  	* generic/threadPoolCmd.c (AppExitHandler): fix teardown to
  	destruct pool list correctly. [Bug 1427570]


type: ci
user: vasiljevic
comment:
  SvIncrObjCmd now implicitly creates shared array and variable and
  initializes it to zero if the variable and/or array is not found.


type: ci
user: vasiljevic
comment:
  For AOLserver module builds, skip calling Tcl_PkgRreqiure and just
  shortcut to Thread_Init as we not like to load ttrace there by default.


type: ci
user: vasiljevic
comment:
  Added ThreadInit and modifed Thread_Init to call it before
  declaring the package loaded. The ThreadInit is now used to
  initalize C-package only w/o making the package "loaded"
  so the subsequent "package require Thread" done from the Tcl
  level will finish and completely load the package in the
  interpreter.


type: ci
user: vasiljevic
comment:
  lib/ttrace.tcl: Spliced version numbering of the
  Ttrace package to the version of the Thread package
  because of the weirdness of the Tcl package loading
  mechanism. Also, the broadcast script used within
  the ttrace::eval now explicitly loads Ttrace package
  in every broadcasted thread.


type: ci
user: vasiljevic
comment:
  Automatically call "ttrace::update" when ttrace package is loaded.
  This simplifies handling during the new thread creation.


type: ci
user: vasiljevic
comment:
  Uses package name again to construct names of the helper proc so we do
  not inadvertently overwrite some other user procedures when loading
  the package.


type: ci
user: vasiljevic
comment:
  Fixed Sp_ReadWriteMutexRLock() to check existence of sole writer
  by checking the mutex lockcount to be negative


type: ci
user: vasiljevic
comment:
  Fixed memory leak when registering Gdbm store handler. We registered
  the handler every time the module was initialized. Now we
  do it only for the first initialization.


type: ci
user: patthoyts
comment:
  	* win/vc/rules.vc:     Updated the nmake build system to match
  	* win/vc/nmakehlp.c:   current 8.5. (support for non-intel build
  	* win/vc/makefile.vc:  and recent versions of msvc compiler)
  	* win/thread.rc:       Fixed line endings.


type: ci
user: vasiljevic
comment:
  generic/threadSpCmd.h: Added one cond variable per
  sync bucket to wait for item deletion.

  generic/threadSpCmd.c: Threads that want to delete
  any sync primitive now wait properly until the last
  thread that references the primitive detaches.

  Fixed (broken) reference counting of items.

  Fixed wrong release of an condition variable that is
  about to be time-waited.


type: ci
user: vasiljevic
comment:
  RemoveAnyItem plugs the item out of the hash-table before releasing
  the bucket mutex while waiting on the item to be free for deletion.


type: ci
user: vasiljevic
comment:
  generic/threadPool.c: fixed race condition when
  creating minworkers worker thread upfront.
  Failure to create one results in partial pool teardown.
  Fix for Bug # 2005794.


type: ci
user: hobbs
comment:
  	* generic/threadCmd.c (ThreadCutChannel): fix const warning
  	(ThreadSend): safely set interp result object [Bug #1988779]


type: ci
user: hobbs
comment:
  	* generic/threadSvCmd.c: Handle TIP#336 addition of API to access
  	* generic/threadSpCmd.c: interp->errorLine


type: ci
user: ferrieux
comment:
   Reorder things in RemoveMutex and RemoveCondv [Bugs 2511424,2511408]; fix a Put* leak in an error path of rwmutexes [Bug 2511420].


type: ci
user: ferrieux
comment:
  Constify Tcl_ObjGetType return values to get rid of const warnings; #if 0 of SvFinalize which is unused.


type: ci
user: nijtmans
ecomment:
  Silence gcc warning: dereferencing type-punned
  pointer will break strict-aliasing rules
  Regenerated configure script using latest TEA

comment:
  Silence gcc warning: dereferencing type-punned
  pointer will break strict-aliasing rules
  Regenerated configure script using latest TEA


type: ci
user: vasiljevic
comment:
  * generic/threadCmd.c: serialize Tcl_CreateInterp()
  as it is thread-unsafe (indirectly modifies global
  variables w/o protecting locks).


type: ci
user: andreas_kupries
comment:
  	* generic/threadSpCmd.c (ThreadMutexObjCmd, ThreadRWMutexObjCmd):
  	[Bug 3007426]: Dropped trailing commas in enum definitions which
  	choked the strictly C89 AIX compiler.


type: ci
user: andreas_kupries
comment:
  	* pkgIndex.tcl.in: Fixed procedure collisions for Thread package
  	by inlining the load command into the ifneeded script, as is
  	standard for most binary packages. Tweaked the procedure for
  	Ttrace a bit, as the result of [info commands] is a list, and
  	using ::apply when possible. A named procedure is only a fallback.


type: ci
user: dkf
comment:
  	* lib/ttrace.tcl: [Bug 3033206]: Be careful with variables outside of
  	procedures; Tcl's variable resolution rules can jump in if a variable
  	is not declared, which can be at best surprising.
  	Also rewrote the namespace serialization code to be more robust.


type: ci
user: andreas_kupries
comment:
  	* lib/ttrace.tcl (_serializensp, _serializeproc): Fixed typos
  	  which smashed namespace name and opening brace of a script
  	  together, leading to a syntax error for 'namespace eval' and
  	  preventing the use of package Ttrace.


type: ci
user: dkf
comment:
  	* doc/tpool.man, doc/tsv.man: Remove spaces in titledesc declaration;
  	doctools currently does not like it at all when generating correct
  	nroff output.


type: ci
user: vasiljevic
comment:
          * generic/threadCmd.c: Initialize tsdPtr->interp to NULL immediately after
          releasing the interp on thread-exit that should hopefully resolve the
          Tcl Bug #3026061

          * generic/threadCmd.c: Removed safe-init so safe-interps should not be
          able to run thread commands directly.

          * lib/ttrace.tcl: Changed version to 2.6.7 to be in sync with main pkg.

          * configure.in: Bumped version to 2.6.7 and autoconf'ed.


type: ci
user: vasiljevic
comment:
  * generic/configure      Regenrated for TEA 3.9. Bumped version string
  * generic/configiue.in   in all relevant files to 2.6.7  and autoconf'ed.
  * win/vc/pkg.vc


type: ci
user: dgp
comment:
          * Makefile.in:          Revised the `make dist` target so that the
          * win/README.txt:       files under thread/win/vc in CVS are copied to
          * win/vc/makefile.vc:   thread/win in the release, where tcl/pkgs/
          * win/vc/thread_win.dsp:        expects to find them.

          * configure:    autoconf-2.59


type: g
user: dgp
comment:
  Edit [cd42ccc3d6814682|cd42ccc3d6]: Edit check-in comment. Add tag "thread-2-0". Cancel tag "rel-2-0".


type: ci
bgcolor: #f0f080
user: dgp
comment:
  New branch "finalize" where the attempts to finalize the Thread package
  are re-enabled and extended.  Meant to be used in memory leak testing and
  similar debugging scenarios.  Not committed to trunk since comments indicate
  only "the brave" would attempt such an unsolvable problem.


type: ci
user: mistachkin
comment:
  Support asynchronous script cancellation, per TIP #285 (i.e. thread::cancel).  Necessary to replace use of testthread::cancel in the Tcl 8.6 test suite.


type: ci
user: mistachkin
comment:
  Update all remaining versions to 2.7b1. For [thread::cancel], avoid creating a new Tcl_Obj when the default script cancellation result is desired. Stop using -debug:full as it causes an error with the MSVC10 compiler.


type: ci
user: mistachkin
comment:
  The [thread::wait] command must cooperate with the interpreter resource limiting (TIP #143) and asynchronous script cancellation (TIP #285) functionality, when available.


type: ci
user: mistachkin
comment:
  The [thread::wait] command should use the TCL_CANCEL_UNWIND flag when calling Tcl_Canceled because it manages its own event processing loop.  Also, if the event processing loop is terminated due to a script in progress being canceled or exceeding a runtime limit, the registered error script should be evaluated, if any.


type: ci
user: mistachkin
comment:
  Refactor ThreadEventProc to make sure all paths out of the function call Tcl_Release on the necessary Tcl interpreters. Also, call ThreadErrorProc consistently whenever the return code is not TCL_OK (i.e. do not check for it to be equal to TCL_ERROR).


type: ci
user: mistachkin
comment:
  Correct check for current thread in the ThreadReserve function [Bug 3411244].  Correct the order for releasing the interpreter and freeing memory, see check-in [6067508840].


type: ci
bgcolor: #000000
user: jan.nijtmans
comment:
  No longer depend on tcl_platform(threaded) variable starting with Tcl 8.6, since it's always compiled threaded


type: g
user: dgp
comment:
  Edit [241dbe3c53647f3f|241dbe3c53]: Move to branch [/timeline?r=mistake&nd&dp=241dbe3c53647f3f&unhide | mistake]. Change background color to "#000000".


type: g
user: dgp
comment:
  Edit [db1b6eda66d29b7e|db1b6eda66]: Move to branch [/timeline?r=mistake&nd&dp=db1b6eda66d29b7e&unhide | mistake]. Change background color to "#000000".


type: ci
user: andreask
comment:
  Regenerated configure with ac 2.59, using newest tcl.m4. Fixed win* SEH, EXCEPTION_DISPOSITION tests which are gcc-only.


type: ci
user: dgp
comment:
  Eliminate some tricky finalization problems by converting the SpBucket arrays
  from dynamic storage to static storage so they no longer need to be finalized.
  Since they have fixed size of NUMSPBUCKETS, I don't see any strong reason not
  to do this.


type: ci
user: zoran
comment:
  generic/threadCmd.c: Fixed leaking callback data in ThreadSend()
  plus some minor cosmetic changes (tx to Gustaf Neumann).


type: ci
user: zoran
comment:
  Removed extra clbk free in ThreadSend as it may be a double-free.
  The clbk data, if present, is fed as a regular work to the 
  originator thread and is freed there, so freeing it again may
  cause trouble.


type: g
user: jan.nijtmans
comment:
  Edit [26b072f1615f8f32|26b072f161]: Move to branch [/timeline?r=mistake&nd&dp=26b072f1615f8f32&unhide | mistake]. Change background color to "#000000".


type: g
user: jan.nijtmans
comment:
  Edit [b1d8aa9c2ff83175|b1d8aa9c2f]: Move to branch [/timeline?r=thread-2-6-branch&nd&dp=b1d8aa9c2ff83175&unhide | thread-2-6-branch].


type: g
user: jan.nijtmans
comment:
  Edit [9f25eb6b9c2c2963|9f25eb6b9c]: Move to branch [/timeline?r=trunk&nd&dp=9f25eb6b9c2c2963&unhide | trunk].


type: ci
user: jan.nijtmans
comment:
  (Unofficial) variant of Thread 2.7, which works with Tcl 8.5+.
  As soon as Thread 2.7 is final, it will work with 8.4 as well.


type: ci
user: jan.nijtmans
comment:
  Fixed leaking callback data in ThreadSend()
  <p>(tx to Gustaf Neumann)
  <p>(Backported from trunk [d0f7d0adb2])


type: ci
user: jan.nijtmans
comment:
  Use "::tcltest::loadTestedCommands" to make sure that the right Thread version is tested, without requiring explicit version numbers.


type: ci
user: dgp
comment:
  Drop claims of pre-8.6 Tcl support.  Drop AOLserver support claim too until
  someone can vouch for it and restore it.


type: ci
user: jan.nijtmans
comment:
  renamed aolstub.cpp to threadAol.c, and gradually move all NS_AOLSERVER usages to there.
  <p>Duplicate all tsv commands, in case Thread is loaded in AOLserver
  <p>move haveInterpCancel check to ThreadCancel


type: ci
user: jan.nijtmans
comment:
  bug-fix: Allow the thread::wait command to return stack-traces of both the current thread and the waited-for thread.


type: ci
user: jan.nijtmans
comment:
  Use tcl_platform(threaded) on Tcl8.4 and &#91;::tcl::pkgconfig get threaded&#93; on higher Tcl version, for testing whether Tcl is compiled with threads support.


type: ci
user: jan.nijtmans
comment:
  merge-mark rc branch to trunk (indicating that the 2.7b1 -> 2.7.0 renaming is already done on trunk now)


type: ci
user: jan.nijtmans
comment:
  Eliminate deprecation warning regarding interp->errorLine. Can only be done when Tcl 8.6 provides Tcl_GetErrorLine as macro


type: ci
user: dgp
comment:
  Make sure any new [thread::configure -eventmark] setting actually has
  an effect on blocks that are currently active.


type: ci
user: mistachkin
comment:
  Restore compile-time and runtime checks for TIP #143 and #285; by default, enable at compile-time and check availability at runtime.


type: ci
user: jan.nijtmans
ecomment:
  Missing changelog entry for Joe's work.
  <p>Move back test for core threaded functionality from pkgIndex.tcl to threadCmd.c, so it cannot be circumvented any more.

comment:
  Missing changelog entry for Joe's work.
  <p>Move back test for core threaded functionality from pkgIndex.tcl to threadCmd.c, so it cannot be escaped any more.


type: ci
user: jan.nijtmans
comment:
  Fix minor compiler warning.
  Some direct calls of functions which are thin wrappers around other functions.


type: ci
user: dgp
comment:
  Minimal changes to let Thread 2.7.0, etc. build against novem headers, and
  [load] into novem interps.


type: ci
user: jan.nijtmans
comment:
  Take over some changes from novem-support.
  The "novem" branch should only be compilable on Tcl 9.0+,
  but on 32-bit platforms it should be runnable on Tcl 8.6 as well.
  Reason: Tcl 9.0 should be source compatible with 8.6 with some
  restrictions: Some API's might be removed, others added, and
  many (unsigned) int/long arguments might become size_t or ssize_t.
  Thread doesn't need any of the added API's, only the common
  subset of Tcl 8.6/9.0. On 32-bit platforms, int/long/size_t all have
  the same size, so that should not influence the runnability.


type: ci
user: jan.nijtmans
comment:
  Make "novem" compilable against Tcl's "novem-64bit-sizes". Highly experimental.
  Still compiles/runs fine when compiled against "novem" branch, crashes when using "novem-64bit-sizes" branch!


type: ci
user: jan.nijtmans
comment:
  Allow Thread to be loaded by 8.4 up to novem, no matter what headers it is compiled with. 
  I don't think it's wise for Thread 2.7 to go this way, but it is meant to investigate what we can do in Tcl_InitStubs() to protect extension authors from obvious mistakes.


type: ci
user: jan.nijtmans
comment:
  merge trunk
  if sizeof(size_t)!=sizeof(int), Thread 2.7 only loads in the same Tcl major version as it was compiled with.


type: ci
user: jan.nijtmans
comment:
  Add runtime detection of Tcl_AddErrorInfo vs. Tcl_AppendObjToErrorInfo and Tcl_GetErrorLine vs.	interp->errorLine.
  Replace Tcl_GetString to Tcl_GetStringFromObj and Tcl_GetStringResult to Tcl_GetObjResult everywhere. This will make it more likely that Thread will run in Tcl9 unmodified, no matter what API changes are made.


type: ci
user: jan.nijtmans
comment:
  Eliminate the use of internalRep.otherValuePtr everywhere, use internalRep.twoPtrValue.ptr1 in stead


type: ci
user: jan.nijtmans
ecomment:
  Change some internal variable from int to size_t, so they can handle larger string lengths.
  Eliminate some Tcl_ConvertToType calls.

comment:
  Change some internal variable from int to size_t, so they can handle larger string lengths.
  Eliminate some Tcl_ConvertToObjType calls.


type: ci
user: jan.nijtmans
comment:
  Change a few internal variables from type int to type size_t.
  Simplify determination of whether Tcl is compiled with thread support.
  Update to latest TEA.


type: ci
user: jan.nijtmans
comment:
  Fix bug reported by Gustaf Neumann:

  just found a bug in thread 2.7.0. When NS_AOLSERVER is defined, thread2.7.0
  defines for every function a second tcl-command called cmdPtr->cmdName2,
  (e.g. sv_set something abc 123), which gets 1 as ClientData passed.
  The command implementations treat the passed clientData as Container *,
  which seg faults, when 1 is passed.


type: ci
user: jan.nijtmans
comment:
  K&R -> ANSI-C (patch from Gustaf Neumann)
  Change SvNamesObjCmd, such that it uses the object container from its "args" argument.


type: ci
user: jan.nijtmans
comment:
  Fix compiler warning. 
  Eliminate all usage of "Long" API: Either use "Int" or "WideInt", which give the same results in 32-bit and 64-bit platforms.


type: ci
user: jan.nijtmans
comment:
  Allow Thread 2.7 to be loaded in Tcl 9.0 "novem"on 32-bit platforms. On 64-bit platforms that's impossible because binary incompatibilies are planned.


type: t
user: vasiljevic
brief: Closed ticket [1050490fffffffff|1050490fff].
comment:
  Closed ticket [1050490fffffffff|1050490fff]: <i>invalid ref in ThreadSetResult</i> plus 7 other changes


type: t
user: msofer
brief: Ticket [1860425fffffffff|1860425fff]: 4 changes
comment:
  Ticket [1860425fffffffff|1860425fff] <i>core dump on FreeBSD, thread::create</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Ticket [405443ffffffffff|405443ffff]: 1 change
comment:
  Ticket [405443ffffffffff|405443ffff] <i>thread::send does not return</i> status still Open with 1 other change


type: t
user: elfring
brief: Ticket [659131ffffffffff|659131ffff]: 4 changes
comment:
  Ticket [659131ffffffffff|659131ffff] <i>development targets: Complete pthreads?</i> status still Open with 4 other changes


type: t
user: twylite
brief: New ticket [1716587fffffffff|1716587fff].
comment:
  New ticket [1716587fffffffff|1716587fff] <i>Thread tests can&#39;t run (bad args from makefile)</i>.


type: t
user: ferrieux
brief: Ticket [2511408fffffffff|2511408fff]: 4 changes
comment:
  Ticket [2511408fffffffff|2511408fff] <i>mutex test errors</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [219320ffffffffff|219320ffff]: 1 change
comment:
  Ticket [219320ffffffffff|219320ffff] <i>Tcl_Finalize doesn&#39;t clean-up running threads</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Ticket [1712723fffffffff|1712723fff]: 4 changes
comment:
  Ticket [1712723fffffffff|1712723fff] <i>joinable threads die on Solaris 64-bit</i> status still Open with 4 other changes


type: t
user: mooooooo
brief: Ticket [933975ffffffffff|933975ffff]: 4 changes
comment:
  Ticket [933975ffffffffff|933975ffff] <i>tpool::create -minworkers</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3056785fffffffff|3056785fff]: 4 changes
comment:
  Ticket [3056785fffffffff|3056785fff] <i>update to TEA 3.9 and Thread 2.6.7 release</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Pending ticket [1634129fffffffff|1634129fff].
comment:
  Pending ticket [1634129fffffffff|1634129fff]: <i>bus error during gmake test </i> plus 7 other changes


type: t
user: dgp
brief: Ticket [418689ffffffffff|418689ffff]: 5 changes
comment:
  Ticket [418689ffffffffff|418689ffff] <i>Tcl_FinalizeThread missing</i> status still Open with 5 other changes


type: t
user: nobody
brief: Ticket [406058ffffffffff|406058ffff]: 4 changes
comment:
  Ticket [406058ffffffffff|406058ffff] <i>Bug in thread library</i> status still Closed with 4 other changes


type: t
user: rudenstam
brief: Ticket [1965721fffffffff|1965721fff]: 4 changes
comment:
  Ticket [1965721fffffffff|1965721fff] <i>memory corruption in thread pool ?</i> status still Open with 4 other changes


type: t
user: nobody
brief: Ticket [672050ffffffffff|672050ffff]: 4 changes
comment:
  Ticket [672050ffffffffff|672050ffff] <i>function interface design and namespaces</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [3006957fffffffff|3006957fff].
comment:
  Closed ticket [3006957fffffffff|3006957fff]: <i>Script access to Tcl_CancelEval</i> plus 3 other changes


type: t
user: dharan
brief: Ticket [1449383fffffffff|1449383fff]: 4 changes
comment:
  Ticket [1449383fffffffff|1449383fff] <i>Memory leak in Thread</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [577014ffffffffff|577014ffff]: 4 changes
comment:
  Ticket [577014ffffffffff|577014ffff] <i>documentation; wait on thread exits</i> status still Open with 4 other changes


type: t
user: ferrieux
brief: Ticket [2005794fffffffff|2005794fff]: 4 changes
comment:
  Ticket [2005794fffffffff|2005794fff] <i>tpool::create freezes when using minworkers</i> status still Open with 4 other changes


type: t
user: tsanders
brief: Ticket [994229ffffffffff|994229ffff]: 4 changes
comment:
  Ticket [994229ffffffffff|994229ffff] <i>tsv::lock doesn&#39;t lock between threads</i> status still Open with 4 other changes


type: t
user: wobster
brief: Ticket [884549ffffffffff|884549ffff]: 1 change
comment:
  Ticket [884549ffffffffff|884549ffff] <i>Segmentation fault returning value in Thread for Thread 2.5</i> status still Open with 1 other change


type: t
user: arius-marius
brief: Ticket [3532972fffffffff|3532972fff]: 4 changes
comment:
  Ticket [3532972fffffffff|3532972fff] <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [3382401fffffffff|3382401fff]: 4 changes
comment:
  Ticket [3382401fffffffff|3382401fff] <i>Thread pool leaks memory</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [439581ffffffffff|439581ffff]: 1 change
comment:
  Ticket [439581ffffffffff|439581ffff] <i>crash when application terminates</i> status still Open with 1 other change


type: t
user: andreas_kupries
brief: Ticket [3129844fffffffff|3129844fff]: 5 changes
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Crash on specific exit sequence</i> status still Open with 5 other changes


type: t
user: s_euler
brief: New ticket [1934666fffffffff|1934666fff].
comment:
  New ticket [1934666fffffffff|1934666fff] <i>Core dump when using &#39;clock format ...&#39; in a thread</i>.


type: t
user: davygrvy
brief: Ticket [418689ffffffffff|418689ffff]: 4 changes
comment:
  Ticket [418689ffffffffff|418689ffff] <i>Tcl_FinalizeThread missing</i> status still Open with 4 other changes


type: t
user: mistachkin
brief: Ticket [3407860fffffffff|3407860fff]: 4 changes
comment:
  Ticket [3407860fffffffff|3407860fff] <i>thread::exit flaws</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [2979665fffffffff|2979665fff]: 4 changes
comment:
  Ticket [2979665fffffffff|2979665fff] <i>TEA version -&gt; 3.7</i> status still Open with 4 other changes


type: t
user: sebres
brief: Ticket [3493120fffffffff|3493120fff]: 1 change
comment:
  Ticket [3493120fffffffff|3493120fff] <i>Thread extension, memory leak after thread exit</i> status still Open with 1 other change


type: t
user: decosterjos
brief: Ticket [3543020fffffffff|3543020fff]: 4 changes
comment:
  Ticket [3543020fffffffff|3543020fff] <i>Thread extension not building with makefile. when in release</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [1988779fffffffff|1988779fff]: 4 changes
comment:
  Ticket [1988779fffffffff|1988779fff] <i>Tcl_SetStringObj called with shared object</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [219320ffffffffff|219320ffff].
comment:
  Closed ticket [219320ffffffffff|219320ffff]: <i>Tcl_Finalize doesn&#39;t clean-up running threads</i> plus 4 other changes


type: t
user: vasiljevic
brief: Pending ticket [3026061fffffffff|3026061fff].
comment:
  Pending ticket [3026061fffffffff|3026061fff]: <i>threadCmd.c:Init() references an interp but not preserves it</i> plus 7 other changes


type: t
user: ctasada
brief: Ticket [1523697fffffffff|1523697fff]: 4 changes
comment:
  Ticket [1523697fffffffff|1523697fff] <i>Crash using clock commands in a Thread using VFS</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [486399ffffffffff|486399ffff]: 4 changes
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Occasional (1 in 3 times) error</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3381371fffffffff|3381371fff]: 4 changes
comment:
  Ticket [3381371fffffffff|3381371fff] <i>possible memory leak? </i> status still Open with 4 other changes


type: t
user: elfring
comment:
  Add attachment [/artifact/c6c0367edb1e8e1c|tclPosixThread2.zip] to ticket [659131ffffffffff|659131ffff]


type: t
user: davygrvy
brief: Ticket [418693ffffffffff|418693ffff]: 1 change
comment:
  Ticket [418693ffffffffff|418693ffff] <i>thread extension not resposible for this</i> status still Open with 1 other change


type: t
user: twylite
comment:
  Add attachment [/artifact/98ec05e781904210|thread-twy-20070327.zip] to ticket [1689375fffffffff|1689375fff]


type: t
user: hobbs
brief: Ticket [486399ffffffffff|486399ffff]: 1 change
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Occasional (1 in 3 times) error</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Closed ticket [2050025fffffffff|2050025fff].
comment:
  Closed ticket [2050025fffffffff|2050025fff]: <i>Threads extension fails to install in custom location</i> plus 7 other changes


type: t
user: vasiljevic
brief: Ticket [762398ffffffffff|762398ffff]: 4 changes
comment:
  Ticket [762398ffffffffff|762398ffff] <i>support thread priority (Windows only)</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [2511420fffffffff|2511420fff]: 1 change
comment:
  Ticket [2511420fffffffff|2511420fff] <i>thread-20.15 hangs</i> status still Open with 1 other change


type: t
user: nickpa
brief: New ticket [1358496fffffffff|1358496fff].
comment:
  New ticket [1358496fffffffff|1358496fff] <i>ttrace::eval &quot;wrong # args: should be &quot;proc name args body&quot;&quot;</i>.


type: t
user: joergwendt
brief: Ticket [987512ffffffffff|987512ffff]: 4 changes
comment:
  Ticket [987512ffffffffff|987512ffff] <i>mem-leak in thread::send -async </i> status still Open with 4 other changes


type: t
user: tombert
brief: Closed ticket [3382497fffffffff|3382497fff].
comment:
  Closed ticket [3382497fffffffff|3382497fff]: <i>configure error in 2-6-branch</i> plus 6 other changes


type: t
user: vasiljevic
brief: Ticket [487090ffffffffff|487090ffff]: 4 changes
comment:
  Ticket [487090ffffffffff|487090ffff] <i>Thread extension docs</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [745976ffffffffff|745976ffff]: 4 changes
comment:
  Ticket [745976ffffffffff|745976ffff] <i>Thread Extension missing 2.5.2 CVS tag</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Ticket [487214ffffffffff|487214ffff]: 4 changes
comment:
  Ticket [487214ffffffffff|487214ffff] <i>missing ThreadKill() on unix</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [3301634fffffffff|3301634fff]: 4 changes
comment:
  Ticket [3301634fffffffff|3301634fff] <i>Thread release crash</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [406058ffffffffff|406058ffff]: 5 changes
comment:
  Ticket [406058ffffffffff|406058ffff] <i>Bug in thread library</i> status still Open with 5 other changes


type: t
user: dgp
brief: Ticket [3129844fffffffff|3129844fff]: 2 changes
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Crash on specific exit sequence</i> status still Open with 2 other changes


type: t
user: ferrieux
brief: Ticket [3129844fffffffff|3129844fff]: 4 changes
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Thread hangs on specific exit sequence</i> status still Open with 4 other changes


type: t
user: tombert
brief: Ticket [3382497fffffffff|3382497fff]: 4 changes
comment:
  Ticket [3382497fffffffff|3382497fff] <i>configure error in 2-6-branch</i> status still Open with 4 other changes


type: t
user: juliannoble
brief: Ticket [1575342fffffffff|1575342fff]: 4 changes
comment:
  Ticket [1575342fffffffff|1575342fff] <i>tsv keyed list segfault</i> status still Open with 4 other changes


type: t
user: msofer
brief: Ticket [486399ffffffffff|486399ffff]: 1 change
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Panic on exit before all threads returned</i> status still Open with 1 other change


type: t
user: hobbs
brief: Ticket [1934666fffffffff|1934666fff]: 4 changes
comment:
  Ticket [1934666fffffffff|1934666fff] <i>Core dump when using &#39;clock format ...&#39; in a thread</i> status still Open with 4 other changes


type: t
user: dkf
brief: Ticket [1449383fffffffff|1449383fff]: 1 change
comment:
  Ticket [1449383fffffffff|1449383fff] <i>Memory leak in Thread</i> status still Open with 1 other change


type: t
user: auriocus
comment:
  Add attachment [/artifact/43485ffc607118aa|threadpool_leakdemo.tcl] to ticket [3382401fffffffff|3382401fff]


type: t
user: dgp
brief: Ticket [1603234fffffffff|1603234fff]: 6 changes
comment:
  Ticket [1603234fffffffff|1603234fff] <i>Memory leak with thread::transfer</i> status still Open with 6 other changes


type: t
user: vasiljevic
brief: Ticket [3448556fffffffff|3448556fff]: 4 changes
comment:
  Ticket [3448556fffffffff|3448556fff] <i>Segmentation fault on exit in tsv</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [1521416fffffffff|1521416fff]: 1 change
comment:
  Ticket [1521416fffffffff|1521416fff] <i>thread::release on win32 does not release all memory</i> status still Open with 1 other change


type: t
user: davygrvy
brief: Ticket [405443ffffffffff|405443ffff]: 4 changes
comment:
  Ticket [405443ffffffffff|405443ffff] <i>thread::send does not return</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Closed ticket [1523697fffffffff|1523697fff].
comment:
  Closed ticket [1523697fffffffff|1523697fff]: <i>Crash using clock commands in a Thread using VFS</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [620154ffffffffff|620154ffff].
comment:
  Closed ticket [620154ffffffffff|620154ffff]: <i>Thread termination with TCL</i> plus 6 other changes


type: t
user: dgp
brief: Closed ticket [3091176fffffffff|3091176fff].
comment:
  Closed ticket [3091176fffffffff|3091176fff]: <i>Ttrace package out of sync with Thread package</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [746352ffffffffff|746352ffff].
comment:
  Closed ticket [746352ffffffffff|746352ffff]: <i>warnings: operator== and not all paths return a value</i> plus 6 other changes


type: t
user: mic42
brief: Ticket [1516686fffffffff|1516686fff]: 4 changes
comment:
  Ticket [1516686fffffffff|1516686fff] <i>Crash with Tcl 8.5 on x86_64</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3532972fffffffff|3532972fff]: 1 change
comment:
  Ticket [3532972fffffffff|3532972fff] <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i> status still Open with 1 other change


type: t
user: ferrieux
brief: Ticket [1759529fffffffff|1759529fff]: 4 changes
comment:
  Ticket [1759529fffffffff|1759529fff] <i>Thread tests fails on netbsd</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [464340ffffffffff|464340ffff].
comment:
  Closed ticket [464340ffffffffff|464340ffff]: <i>thread::send might send to wrong interp</i> plus 3 other changes


type: t
user: mistachkin
brief: Ticket [3411244fffffffff|3411244fff]: 5 changes
comment:
  Ticket [3411244fffffffff|3411244fff] <i>[thread::release -wait [thread::id]] hangs</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Closed ticket [2980235fffffffff|2980235fff].
comment:
  Closed ticket [2980235fffffffff|2980235fff]: <i>command pollution in interps w/o package require</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [994229ffffffffff|994229ffff].
comment:
  Closed ticket [994229ffffffffff|994229ffff]: <i>tsv::lock doesn&#39;t lock between threads</i> plus 7 other changes


type: t
user: decosterjos
brief: New ticket [3543020fffffffff|3543020fff].
comment:
  New ticket [3543020fffffffff|3543020fff] <i>Thread extension not building with makefile. when in release</i>.


type: t
user: vasiljevic
brief: Ticket [1051068fffffffff|1051068fff]: 4 changes
comment:
  Ticket [1051068fffffffff|1051068fff] <i>Testsuite crashes, Windows, 8.4</i> status still Open with 4 other changes


type: t
user: msofer
brief: Closed ticket [1860425fffffffff|1860425fff].
comment:
  Closed ticket [1860425fffffffff|1860425fff]: <i>core dump on FreeBSD, thread::create</i> plus 3 other changes


type: t
user: vasiljevic
brief: Ticket [3534581fffffffff|3534581fff]: 5 changes
comment:
  Ticket [3534581fffffffff|3534581fff] <i>tpool::post -nowait still waits</i> status still Open with 5 other changes


type: t
user: nobody
brief: Ticket [1021078fffffffff|1021078fff]: 4 changes
comment:
  Ticket [1021078fffffffff|1021078fff] <i>thread::transfer cause exception</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Closed ticket [219324ffffffffff|219324ffff].
comment:
  Closed ticket [219324ffffffffff|219324ffff]: <i>(tcltest) ThreadErrorProc not always called</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [1073161fffffffff|1073161fff].
comment:
  Closed ticket [1073161fffffffff|1073161fff]: <i>Wrong assignment in ListRemoveInner</i> plus 7 other changes


type: t
user: davygrvy
comment:
  Add attachment [/artifact/8c247426c5fee779|patch_thread_ext_stop_grinding_other_peoples_events.txt] to ticket [418693ffffffffff|418693ffff]


type: t
user: sebres
brief: Ticket [3493120fffffffff|3493120fff]: 4 changes
comment:
  Ticket [3493120fffffffff|3493120fff] <i>Thread extension, memory leak after thread exit</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [3534440fffffffff|3534440fff].
comment:
  Closed ticket [3534440fffffffff|3534440fff]: <i>tpool::wait does not return pending jobs</i> plus 6 other changes


type: t
user: decosterjos
comment:
  Add attachment [/artifact/8bba9c8d0a092257|Makefile.in.patch] to ticket [3543020fffffffff|3543020fff]


type: t
user: elfring
brief: Ticket [674367ffffffffff|674367ffff]: 4 changes
comment:
  Ticket [674367ffffffffff|674367ffff] <i>call for a function that is not thread safe</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [1050490fffffffff|1050490fff]: 4 changes
comment:
  Ticket [1050490fffffffff|1050490fff] <i>invalid ref in ThreadSetResult</i> status still Open with 4 other changes


type: t
user: twylite
brief: Ticket [1835061fffffffff|1835061fff]: 4 changes
comment:
  Ticket [1835061fffffffff|1835061fff] <i>Fail to build and test thread on Win32/MSVC</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [1021078fffffffff|1021078fff]: 1 change
comment:
  Ticket [1021078fffffffff|1021078fff] <i>thread::transfer cause exception (TIP #218)</i> status still Open with 1 other change


type: t
user: dgp
brief: Ticket [487213ffffffffff|487213ffff]: 4 changes
comment:
  Ticket [487213ffffffffff|487213ffff] <i>Thread does not build with Tcl 8.3</i> status still Open with 4 other changes


type: t
user: ferrieux
brief: Ticket [2980143fffffffff|2980143fff]: 5 changes
comment:
  Ticket [2980143fffffffff|2980143fff] <i>support return options</i> status still Open with 5 other changes


type: t
user: elfring
brief: Ticket [674514ffffffffff|674514ffff]: 6 changes
comment:
  Ticket [674514ffffffffff|674514ffff] <i>Is Tcllib thread safe? - code analysis, flaw detection</i> status still Closed with 6 other changes


type: t
user: nobody
brief: New ticket [746352ffffffffff|746352ffff].
comment:
  New ticket [746352ffffffffff|746352ffff] <i>warnings: operator== and not all paths return a value</i>.


type: t
user: davygrvy
brief: Ticket [487090ffffffffff|487090ffff]: 1 change
comment:
  Ticket [487090ffffffffff|487090ffff] <i>Thread extension docs</i> status still Open with 1 other change


type: t
user: sf-robot
brief: Closed ticket [3026061fffffffff|3026061fff].
comment:
  Closed ticket [3026061fffffffff|3026061fff]: <i>threadCmd.c:Init() references an interp but not preserves it</i> plus 6 other changes


type: t
user: nickpa
brief: Ticket [1356721fffffffff|1356721fff]: 4 changes
comment:
  Ticket [1356721fffffffff|1356721fff] <i>tcl8.5a3 segfault foreach loop thread creation</i> status still Open with 4 other changes


type: t
user: tomkiti
brief: Ticket [3534440fffffffff|3534440fff]: 4 changes
comment:
  Ticket [3534440fffffffff|3534440fff] <i>tpool::wait does not return pending jobs</i> status still Open with 4 other changes


type: t
user: dkf
brief: Ticket [1516686fffffffff|1516686fff]: 1 change
comment:
  Ticket [1516686fffffffff|1516686fff] <i>Crash with Tcl 8.5 on x86_64</i> status still Open with 1 other change


type: t
user: dgp
brief: Ticket [503446ffffffffff|503446ffff]: 4 changes
comment:
  Ticket [503446ffffffffff|503446ffff] <i>Thread: Installation of headers fails</i> status still Open with 4 other changes


type: t
user: mdejong
brief: Ticket [584123ffffffffff|584123ffff]: 6 changes
comment:
  Ticket [584123ffffffffff|584123ffff] <i>Patch to fully stub enable Thread packag</i> status still Closed with 6 other changes


type: t
user: nobody
brief: Ticket [1603234fffffffff|1603234fff]: 4 changes
comment:
  Ticket [1603234fffffffff|1603234fff] <i>Memory leak with thread::transfer</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [584123ffffffffff|584123ffff].
comment:
  Closed ticket [584123ffffffffff|584123ffff]: <i>Patch to fully stub enable Thread packag</i> plus 6 other changes


type: t
user: dgp
brief: Ticket [1163357fffffffff|1163357fff]: 4 changes
comment:
  Ticket [1163357fffffffff|1163357fff] <i>build dir outside source dir not supported</i> status still Open with 4 other changes


type: t
user: elfring
brief: Ticket [612513ffffffffff|612513ffff]: 4 changes
comment:
  Ticket [612513ffffffffff|612513ffff] <i>Detect deadlocks with TCL</i> status still Open with 4 other changes


type: t
user: elfring
brief: Pending ticket [659131ffffffffff|659131ffff].
comment:
  Pending ticket [659131ffffffffff|659131ffff]: <i>development targets: Complete pthreads?</i> plus 4 other changes


type: t
user: davygrvy
brief: Closed ticket [405443ffffffffff|405443ffff].
comment:
  Closed ticket [405443ffffffffff|405443ffff]: <i>thread::send does not return</i> plus 7 other changes


type: t
user: dgp
brief: Closed ticket [3411242fffffffff|3411242fff].
comment:
  Closed ticket [3411242fffffffff|3411242fff]: <i>[thread::release -wait] crashes</i> plus 8 other changes


type: t
user: davygrvy
brief: Ticket [219324ffffffffff|219324ffff]: 5 changes
comment:
  Ticket [219324ffffffffff|219324ffff] <i>(tcltest) ThreadErrorProc not always called</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Open ticket [1267256fffffffff|1267256fff].
comment:
  Open ticket [1267256fffffffff|1267256fff]: <i>enable static linking when TclX is present</i> plus 5 other changes


type: t
user: vasiljevic
brief: Ticket [1851243fffffffff|1851243fff]: 4 changes
comment:
  Ticket [1851243fffffffff|1851243fff] <i>typo of tpool&#39;s man</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [659131ffffffffff|659131ffff]: 6 changes
comment:
  Ticket [659131ffffffffff|659131ffff] <i>development targets: Complete pthreads?</i> status still Pending with 6 other changes


type: t
user: dkf
brief: Ticket [1575342fffffffff|1575342fff]: 2 changes
comment:
  Ticket [1575342fffffffff|1575342fff] <i>tsv keyed list segfault</i> status still Open with 2 other changes


type: t
user: davygrvy
brief: Ticket [219320ffffffffff|219320ffff]: 4 changes
comment:
  Ticket [219320ffffffffff|219320ffff] <i>Tcl_Finalize doesn&#39;t clean-up running threads</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [3534581fffffffff|3534581fff].
comment:
  Closed ticket [3534581fffffffff|3534581fff]: <i>tpool::post -nowait still waits</i> plus 6 other changes


type: t
user: davygrvy
brief: Ticket [421246ffffffffff|421246ffff]: 1 change
comment:
  Ticket [421246ffffffffff|421246ffff] <i>Problem with unix compilation in thread/</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Ticket [3006957fffffffff|3006957fff]: 4 changes
comment:
  Ticket [3006957fffffffff|3006957fff] <i>Script access to Tcl_CancelEval</i> status still Open with 4 other changes


type: t
user: msofer
comment:
  Add attachment [/artifact/99548c9b654f7d44|tclUnixThrd.diff] to ticket [1860425fffffffff|1860425fff]


type: t
user: andreas_kupries
brief: Ticket [3382497fffffffff|3382497fff]: 5 changes
comment:
  Ticket [3382497fffffffff|3382497fff] <i>configure error in 2-6-branch</i> status still Open with 5 other changes


type: t
user: auriocus
comment:
  Add attachment [/artifact/b460f9be6314afc4|threadpool_leakdemo84_slow.tcl] to ticket [3382401fffffffff|3382401fff]


type: t
user: vasiljevic
brief: Closed ticket [3534442fffffffff|3534442fff].
comment:
  Closed ticket [3534442fffffffff|3534442fff]: <i>tpool::create -idletime documentation incorrect</i> plus 6 other changes


type: t
user: vasiljevic
brief: Ticket [1267256fffffffff|1267256fff]: 4 changes
comment:
  Ticket [1267256fffffffff|1267256fff] <i>enable static linking when TclX is present</i> status still Open with 4 other changes


type: t
user: thommey
brief: New ticket [3033206fffffffff|3033206fff].
comment:
  New ticket [3033206fffffffff|3033206fff] <i>lib/ttrace.tcl uses ::version as temporary variable</i>.


type: t
user: ferrieux
brief: Ticket [2511420fffffffff|2511420fff]: 4 changes
comment:
  Ticket [2511420fffffffff|2511420fff] <i>thread-20.15 hangs</i> status still Open with 4 other changes


type: t
user: twylite
comment:
  Add attachment [/artifact/f6aa6b02ce8c11af|thread-20070510.patch] to ticket [1716587fffffffff|1716587fff]


type: t
user: matt-newman
brief: Ticket [1267256fffffffff|1267256fff]: 5 changes
comment:
  Ticket [1267256fffffffff|1267256fff] <i>enable static linking when TclX is present</i> status still Closed with 5 other changes


type: t
user: vasiljevic
brief: Ticket [2050025fffffffff|2050025fff]: 4 changes
comment:
  Ticket [2050025fffffffff|2050025fff] <i>Threads extension fails to install in custom location</i> status still Open with 4 other changes


type: t
user: mistachkin
brief: Ticket [3411244fffffffff|3411244fff]: 4 changes
comment:
  Ticket [3411244fffffffff|3411244fff] <i>[thread::release -wait [thread::id]] hangs</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Ticket [1934666fffffffff|1934666fff]: 5 changes
comment:
  Ticket [1934666fffffffff|1934666fff] <i>Core dump when using &#39;clock format ...&#39; in a thread</i> status still Open with 5 other changes


type: t
user: tombert
brief: Ticket [3129844fffffffff|3129844fff]: 1 change
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Crash on specific exit sequence</i> status still Open with 1 other change


type: t
user: furukawa
brief: Ticket [1245204fffffffff|1245204fff]: 4 changes
comment:
  Ticket [1245204fffffffff|1245204fff] <i>Support for non-standard gdbm location</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3057497fffffffff|3057497fff]: 4 changes
comment:
  Ticket [3057497fffffffff|3057497fff] <i>pkgIndex versions out of date on Win32</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [2511408fffffffff|2511408fff]: 5 changes
comment:
  Ticket [2511408fffffffff|2511408fff] <i>mutex test errors</i> status still Open with 5 other changes


type: t
user: auriocus
comment:
  Add attachment [/artifact/c97ec5cfc3918372|threadpool_leakdemo84.tcl] to ticket [3382401fffffffff|3382401fff]


type: t
user: decosterjos
brief: Open ticket [3543020fffffffff|3543020fff].
comment:
  Open ticket [3543020fffffffff|3543020fff]: <i>Thread extension not building with makefile. when in release</i>


type: t
user: nobody
brief: Ticket [1464731fffffffff|1464731fff]: 4 changes
comment:
  Ticket [1464731fffffffff|1464731fff] <i>Memory leak in Thread release</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [2979572fffffffff|2979572fff]: 4 changes
comment:
  Ticket [2979572fffffffff|2979572fff] <i>compiler warnings threadSpCmd.c</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3407947fffffffff|3407947fff]: 2 changes
comment:
  Ticket [3407947fffffffff|3407947fff] <i>send to self appears to leak</i> status still Open with 2 other changes


type: t
user: vasiljevic
brief: Ticket [674514ffffffffff|674514ffff]: 4 changes
comment:
  Ticket [674514ffffffffff|674514ffff] <i>Is Tcllib thread safe?</i> status still Open with 4 other changes


type: t
user: mdejong
brief: Ticket [584123ffffffffff|584123ffff]: 4 changes
comment:
  Ticket [584123ffffffffff|584123ffff] <i>Patch to fully stub enable Thread packag</i> status still Open with 4 other changes


type: t
user: dgp
brief: Closed ticket [3057497fffffffff|3057497fff].
comment:
  Closed ticket [3057497fffffffff|3057497fff]: <i>pkgIndex versions out of date on Win32</i> plus 7 other changes


type: t
user: mistachkin
brief: Ticket [1521416fffffffff|1521416fff]: 4 changes
comment:
  Ticket [1521416fffffffff|1521416fff] <i>thread::release on win32 does not release all memory</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [2835615fffffffff|2835615fff].
comment:
  Closed ticket [2835615fffffffff|2835615fff]: <i>Pool suspend/resume feature</i> plus 3 other changes


type: t
user: ferrieux
brief: Ticket [2835615fffffffff|2835615fff]: 4 changes
comment:
  Ticket [2835615fffffffff|2835615fff] <i>Pool suspend/resume feature</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [2980235fffffffff|2980235fff]: 4 changes
comment:
  Ticket [2980235fffffffff|2980235fff] <i>command pollution in interps w/o package require</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [918137ffffffffff|918137ffff]: 4 changes
comment:
  Ticket [918137ffffffffff|918137ffff] <i>pkgIndex.tcl breaks Tcl 7</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [987512ffffffffff|987512ffff].
comment:
  Closed ticket [987512ffffffffff|987512ffff]: <i>mem-leak in thread::send -async </i> plus 7 other changes


type: t
user: sebres
brief: Ticket [1521416fffffffff|1521416fff]: 4 changes
comment:
  Ticket [1521416fffffffff|1521416fff] <i>thread::release on win32 does not release all memory</i> status still Pending with 4 other changes


type: t
user: vasiljevic
brief: Ticket [3534442fffffffff|3534442fff]: 5 changes
comment:
  Ticket [3534442fffffffff|3534442fff] <i>tpool::create -idletime documentation incorrect</i> status still Open with 5 other changes


type: t
user: dkf
brief: Ticket [1021078fffffffff|1021078fff]: 5 changes
comment:
  Ticket [1021078fffffffff|1021078fff] <i>thread::transfer cause exception (TIP #218)</i> status still Open with 5 other changes


type: t
user: davygrvy
brief: Ticket [219324ffffffffff|219324ffff]: 2 changes
comment:
  Ticket [219324ffffffffff|219324ffff] <i>(tcltest) ThreadErrorProc not always called</i> status still Open with 2 other changes


type: t
user: vasiljevic
brief: Ticket [3534607fffffffff|3534607fff]: 5 changes
comment:
  Ticket [3534607fffffffff|3534607fff] <i>tpool::get sets errorInfo incorrectly</i> status still Open with 5 other changes


type: t
user: twylite
brief: Ticket [1689375fffffffff|1689375fff]: 4 changes
comment:
  Ticket [1689375fffffffff|1689375fff] <i>Update VC makefile for Threads (Fix for bug 1643367)</i> status still Open with 4 other changes


type: t
user: dgp
brief: Open ticket [1521416fffffffff|1521416fff].
comment:
  Open ticket [1521416fffffffff|1521416fff]: <i>thread::release on win32 does not release all memory</i> plus 6 other changes


type: t
user: vasiljevic
brief: Closed ticket [1516450fffffffff|1516450fff].
comment:
  Closed ticket [1516450fffffffff|1516450fff]: <i>Compiler warnings building on x86_64</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [487214ffffffffff|487214ffff].
comment:
  Closed ticket [487214ffffffffff|487214ffff]: <i>missing ThreadKill() on unix</i> plus 3 other changes


type: t
user: hobbs
brief: Closed ticket [1516686fffffffff|1516686fff].
comment:
  Closed ticket [1516686fffffffff|1516686fff]: <i>Crash with Tcl 8.5 on x86_64</i> plus 7 other changes


type: t
user: elfring
brief: Ticket [620154ffffffffff|620154ffff]: 4 changes
comment:
  Ticket [620154ffffffffff|620154ffff] <i>Thread termination with TCL</i> status still Open with 4 other changes


type: t
user: ferrieux
brief: Ticket [486399ffffffffff|486399ffff]: 4 changes
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Panic on exit before all threads returned</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [486399ffffffffff|486399ffff]: 5 changes
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Occasional (1 in 3 times) error</i> status still Open with 5 other changes


type: t
user: tomkiti
comment:
  Add attachment [/artifact/a3dacba34621a596|postNowaitBug.tcl] to ticket [3534581fffffffff|3534581fff]


type: t
user: dgp
brief: Ticket [3056785fffffffff|3056785fff]: 5 changes
comment:
  Ticket [3056785fffffffff|3056785fff] <i>update to TEA 3.9 and Thread 2.6.7 release</i> status still Open with 5 other changes


type: t
user: ferrieux
brief: Closed ticket [2511424fffffffff|2511424fff].
comment:
  Closed ticket [2511424fffffffff|2511424fff]: <i>condition variable error in thread-21.16</i> plus 6 other changes


type: t
user: davygrvy
brief: Ticket [219324ffffffffff|219324ffff]: 4 changes
comment:
  Ticket [219324ffffffffff|219324ffff] <i>(tcltest) ThreadErrorProc not always called</i> status still Open with 4 other changes


type: t
user: elfring
brief: Ticket [674514ffffffffff|674514ffff]: 5 changes
comment:
  Ticket [674514ffffffffff|674514ffff] <i>Is Tcllib thread safe? - code analysis, flaw detection</i> status still Open with 5 other changes


type: t
user: davygrvy
brief: Ticket [406058ffffffffff|406058ffff]: 4 changes
comment:
  Ticket [406058ffffffffff|406058ffff] <i>Bug in thread library</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [1505810fffffffff|1505810fff]: 4 changes
comment:
  Ticket [1505810fffffffff|1505810fff] <i>init.tcl not found in thread interpreter </i> status still Open with 4 other changes


type: t
user: villalba
brief: Ticket [406058ffffffffff|406058ffff]: 6 changes
comment:
  Ticket [406058ffffffffff|406058ffff] <i>Bug in thread library</i> status still Closed with 6 other changes


type: t
user: vasiljevic
brief: Closed ticket [599290ffffffffff|599290ffff].
comment:
  Closed ticket [599290ffffffffff|599290ffff]: <i>potential segfault in NewThread()</i> plus 6 other changes


type: t
user: dgp
brief: Closed ticket [3383288fffffffff|3383288fff].
comment:
  Closed ticket [3383288fffffffff|3383288fff]: <i>rules.vc missing support for MSVC10</i> plus 7 other changes


type: t
user: dgp
brief: Ticket [3543020fffffffff|3543020fff]: 1 change
comment:
  Ticket [3543020fffffffff|3543020fff] <i>Thread extension not building with makefile. when in release</i> status still Open with 1 other change


type: t
user: andreas_kupries
brief: Closed ticket [3129844fffffffff|3129844fff].
comment:
  Closed ticket [3129844fffffffff|3129844fff]: <i>Thread hangs on specific exit sequence</i> plus 6 other changes


type: t
user: wobster
brief: Ticket [884549ffffffffff|884549ffff]: 4 changes
comment:
  Ticket [884549ffffffffff|884549ffff] <i>Segmentation fault returning value in Thread for Thread 2.5</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [659131ffffffffff|659131ffff].
comment:
  Closed ticket [659131ffffffffff|659131ffff]: <i>development targets: Complete pthreads?</i> plus 6 other changes


type: t
user: dkf
brief: Ticket [1073161fffffffff|1073161fff]: 1 change
comment:
  Ticket [1073161fffffffff|1073161fff] <i>Wrong assignment in ListRemoveInner</i> status still Open with 1 other change


type: t
user: ferrieux
brief: Closed ticket [486399ffffffffff|486399ffff].
comment:
  Closed ticket [486399ffffffffff|486399ffff]: <i>Panic on exit before all threads returned</i> plus 7 other changes


type: t
user: elfring
brief: Ticket [659131ffffffffff|659131ffff]: 4 changes
comment:
  Ticket [659131ffffffffff|659131ffff] <i>development targets: Complete pthreads?</i> status still Closed with 4 other changes


type: t
user: vasiljevic
brief: Ticket [674514ffffffffff|674514ffff]: 4 changes
comment:
  Ticket [674514ffffffffff|674514ffff] <i>Is Tcllib thread safe? - code analysis, flaw detection</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [1076117fffffffff|1076117fff].
comment:
  Closed ticket [1076117fffffffff|1076117fff]: <i>cvs head thread package configure bugs</i> plus 7 other changes


type: t
user: vasiljevic
brief: Ticket [3129844fffffffff|3129844fff]: 4 changes
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Thread hangs on specific exit sequence</i> status still Closed with 4 other changes


type: t
user: tombert
brief: Ticket [3129844fffffffff|3129844fff]: 1 change
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Thread hangs on specific exit sequence</i> status still Open with 1 other change


type: t
user: dgp
brief: Ticket [3383288fffffffff|3383288fff]: 6 changes
comment:
  Ticket [3383288fffffffff|3383288fff] <i>rules.vc missing support for MSVC10</i> status still Open with 6 other changes


type: t
user: dgp
brief: Closed ticket [3056785fffffffff|3056785fff].
comment:
  Closed ticket [3056785fffffffff|3056785fff]: <i>update to TEA 3.9 and Thread 2.6.7 release</i> plus 7 other changes


type: t
user: twylite
brief: Closed ticket [1716587fffffffff|1716587fff].
comment:
  Closed ticket [1716587fffffffff|1716587fff]: <i>Thread tests can&#39;t run (bad args from makefile)</i> plus 7 other changes


type: t
user: patthoyts
brief: Closed ticket [1643367fffffffff|1643367fff].
comment:
  Closed ticket [1643367fffffffff|1643367fff]: <i>Thread extension cannot compile with VC8</i> plus 7 other changes


type: t
user: decosterjos
brief: Open ticket [3543020fffffffff|3543020fff].
comment:
  Open ticket [3543020fffffffff|3543020fff]: <i>Thread extension not building with makefile. when in release</i> plus 4 other changes


type: t
user: dgp
brief: Ticket [918137ffffffffff|918137ffff]: 1 change
comment:
  Ticket [918137ffffffffff|918137ffff] <i>pkgIndex.tcl breaks Tcl 7</i> status still Closed with 1 other change


type: t
user: nyademo
comment:
  Add attachment [/artifact/e316b11a4d96d69a|threadPoolCmd.c.patch] to ticket [1512225fffffffff|1512225fff]


type: t
user: nobody
brief: Ticket [560387ffffffffff|560387ffff]: 4 changes
comment:
  Ticket [560387ffffffffff|560387ffff] <i>Package version incorrect</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [416850ffffffffff|416850ffff]: 2 changes
comment:
  Ticket [416850ffffffffff|416850ffff] <i>undocumented commands</i> status still Open with 2 other changes


type: t
user: vasiljevic
brief: Closed ticket [595776ffffffffff|595776ffff].
comment:
  Closed ticket [595776ffffffffff|595776ffff]: <i>thread::send manpage innacurate</i> plus 6 other changes


type: t
user: dkf
brief: Closed ticket [674514ffffffffff|674514ffff].
comment:
  Closed ticket [674514ffffffffff|674514ffff]: <i>Is Tcllib thread safe? - code analysis, flaw detection</i> plus 7 other changes


type: t
user: andreas_kupries
brief: Ticket [439581ffffffffff|439581ffff]: 4 changes
comment:
  Ticket [439581ffffffffff|439581ffff] <i>crash when application terminates</i> status still Open with 4 other changes


type: t
user: twylite
brief: Ticket [1716587fffffffff|1716587fff]: 4 changes
comment:
  Ticket [1716587fffffffff|1716587fff] <i>Thread tests can&#39;t run (bad args from makefile)</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Ticket [487213ffffffffff|487213ffff]: 1 change
comment:
  Ticket [487213ffffffffff|487213ffff] <i>Thread does not build with Tcl 8.3</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Closed ticket [884549ffffffffff|884549ffff].
comment:
  Closed ticket [884549ffffffffff|884549ffff]: <i>Segmentation fault returning value in Thread for Thread 2.5</i> plus 6 other changes


type: t
user: mistachkin
brief: Ticket [3439599fffffffff|3439599fff]: 4 changes
comment:
  Ticket [3439599fffffffff|3439599fff] <i>thread::cancel not reporting error</i> status still Open with 4 other changes


type: t
user: twylite
comment:
  Add attachment [/artifact/77532e44c4c7aa56|tcl-thread-build-20071120.patch] to ticket [1835061fffffffff|1835061fff]


type: t
user: vasiljevic
brief: Closed ticket [1716582fffffffff|1716582fff].
comment:
  Closed ticket [1716582fffffffff|1716582fff]: <i>Build broken for OPTS=symbols,unchecked</i> plus 7 other changes


type: t
user: ferrieux
brief: Ticket [2511420fffffffff|2511420fff]: 5 changes
comment:
  Ticket [2511420fffffffff|2511420fff] <i>thread-20.15 hangs</i> status still Open with 5 other changes


type: t
user: rudenstam
brief: Closed ticket [1965721fffffffff|1965721fff].
comment:
  Closed ticket [1965721fffffffff|1965721fff]: <i>memory corruption in thread pool ?</i> plus 6 other changes


type: t
user: hobbs
brief: Closed ticket [1462274fffffffff|1462274fff].
comment:
  Closed ticket [1462274fffffffff|1462274fff]: <i>Out-of-date version number in Win32 VC makefiles</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [1245204fffffffff|1245204fff].
comment:
  Closed ticket [1245204fffffffff|1245204fff]: <i>Support for non-standard gdbm location</i> plus 3 other changes


type: t
user: ferrieux
brief: Ticket [2005794fffffffff|2005794fff]: 4 changes
comment:
  Ticket [2005794fffffffff|2005794fff] <i>tpool::create freezes when using minworkers</i> status still Closed with 4 other changes


type: t
user: taylor_venable
brief: Closed ticket [2688159fffffffff|2688159fff].
comment:
  Closed ticket [2688159fffffffff|2688159fff]: <i>Thread module fails to build against 8.6b1</i> plus 7 other changes


type: t
user: dkf
brief: Ticket [1464731fffffffff|1464731fff]: 2 changes
comment:
  Ticket [1464731fffffffff|1464731fff] <i>Memory leak in Thread release</i> status still Open with 2 other changes


type: t
user: vasiljevic
brief: Closed ticket [3027815fffffffff|3027815fff].
comment:
  Closed ticket [3027815fffffffff|3027815fff]: <i>Safe interpreters can use Thread to execute unsafe commands</i> plus 7 other changes


type: t
user: oehhar
brief: Ticket [3567104fffffffff|3567104fff]: 4 changes
comment:
  Ticket [3567104fffffffff|3567104fff] <i>pkgIndex.tcl bronken when building with Makefile.vc</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [1634129fffffffff|1634129fff]: 4 changes
comment:
  Ticket [1634129fffffffff|1634129fff] <i>bus error during gmake test </i> status still Open with 4 other changes


type: t
user: rtreleaven
brief: Ticket [3494470fffffffff|3494470fff]: 4 changes
comment:
  Ticket [3494470fffffffff|3494470fff] <i>called Tcl_FindHashEntry on deleted table</i> status still Open with 4 other changes


type: t
user: kjnash
brief: New ticket [3027815fffffffff|3027815fff].
comment:
  New ticket [3027815fffffffff|3027815fff] <i>Safe interpreters can use Thread to execute unsafe commands</i>.


type: t
user: vasiljevic
brief: Ticket [2980143fffffffff|2980143fff]: 4 changes
comment:
  Ticket [2980143fffffffff|2980143fff] <i>support return options</i> status still Open with 4 other changes


type: t
user: nobody
brief: Ticket [1449383fffffffff|1449383fff]: 4 changes
comment:
  Ticket [1449383fffffffff|1449383fff] <i>Memory leak in Thread</i> status still Closed with 4 other changes


type: t
user: dkf
brief: Ticket [1860425fffffffff|1860425fff]: 3 changes
comment:
  Ticket [1860425fffffffff|1860425fff] <i>core dump on FreeBSD, thread::create</i> status still Open with 3 other changes


type: t
user: vasiljevic
brief: Ticket [3563391fffffffff|3563391fff]: 4 changes
comment:
  Ticket [3563391fffffffff|3563391fff] <i>Drop unused SpBucket fields</i> status still Open with 4 other changes


type: t
user: mistachkin
brief: Closed ticket [1521416fffffffff|1521416fff].
comment:
  Closed ticket [1521416fffffffff|1521416fff]: <i>thread::release on win32 does not release all memory</i> plus 8 other changes


type: t
user: vasiljevic
brief: Ticket [1449383fffffffff|1449383fff]: 2 changes
comment:
  Ticket [1449383fffffffff|1449383fff] <i>Memory leak in Thread</i> status still Closed with 2 other changes


type: t
user: vasiljevic
brief: Ticket [1512225fffffffff|1512225fff]: 4 changes
comment:
  Ticket [1512225fffffffff|1512225fff] <i>tpool::wait and tpool::cancel set wrong value to variable</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [439581ffffffffff|439581ffff]: 6 changes
comment:
  Ticket [439581ffffffffff|439581ffff] <i>crash when application terminates</i> status still Open with 6 other changes


type: t
user: vasiljevic
brief: Closed ticket [745976ffffffffff|745976ffff].
comment:
  Closed ticket [745976ffffffffff|745976ffff]: <i>Thread Extension missing 2.5.2 CVS tag</i> plus 6 other changes


type: t
user: decosterjos
brief: Ticket [3543020fffffffff|3543020fff]: 4 changes
comment:
  Ticket [3543020fffffffff|3543020fff] <i>Thread extension not building with makefile. when in release</i> status still Pending with 4 other changes


type: t
user: ferrieux
brief: Ticket [2511424fffffffff|2511424fff]: 4 changes
comment:
  Ticket [2511424fffffffff|2511424fff] <i>condition variable error in thread-21.16</i> status still Open with 4 other changes


type: t
user: patthoyts
brief: Closed ticket [1835061fffffffff|1835061fff].
comment:
  Closed ticket [1835061fffffffff|1835061fff]: <i>Fail to build and test thread on Win32/MSVC</i> plus 7 other changes


type: t
user: mistachkin
brief: Ticket [3407947fffffffff|3407947fff]: 4 changes
comment:
  Ticket [3407947fffffffff|3407947fff] <i>send to self appears to leak</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Ticket [2050025fffffffff|2050025fff]: 4 changes
comment:
  Ticket [2050025fffffffff|2050025fff] <i>Threads extension fails to install in custom location</i> status still Closed with 4 other changes


type: t
user: davygrvy
brief: Ticket [487214ffffffffff|487214ffff]: 1 change
comment:
  Ticket [487214ffffffffff|487214ffff] <i>missing ThreadKill() on unix</i> status still Open with 1 other change


type: t
user: ferrieux
brief: Ticket [2511424fffffffff|2511424fff]: 5 changes
comment:
  Ticket [2511424fffffffff|2511424fff] <i>condition variable error in thread-21.16</i> status still Open with 5 other changes


type: t
user: andreas_kupries
brief: Ticket [3382497fffffffff|3382497fff]: 2 changes
comment:
  Ticket [3382497fffffffff|3382497fff] <i>configure error in 2-6-branch</i> status still Closed with 2 other changes


type: t
user: vasiljevic
brief: Closed ticket [1512225fffffffff|1512225fff].
comment:
  Closed ticket [1512225fffffffff|1512225fff]: <i>tpool::wait and tpool::cancel set wrong value to variable</i> plus 3 other changes


type: t
user: vasiljevic
brief: Ticket [3026061fffffffff|3026061fff]: 4 changes
comment:
  Ticket [3026061fffffffff|3026061fff] <i>threadCmd.c:Init() references an interp but not preserves it</i> status still Open with 4 other changes


type: t
user: andreas_kupries
brief: Ticket [503446ffffffffff|503446ffff]: 1 change
comment:
  Ticket [503446ffffffffff|503446ffff] <i>Thread: Installation of headers fails</i> status still Open with 1 other change


type: t
user: dgp
brief: Ticket [1745928fffffffff|1745928fff]: 4 changes
comment:
  Ticket [1745928fffffffff|1745928fff] <i>thread&#39;s memory isn&#39;t being released</i> status still Open with 4 other changes


type: t
user: elfring
brief: Ticket [674514ffffffffff|674514ffff]: 7 changes
comment:
  Ticket [674514ffffffffff|674514ffff] <i>Is Tcllib thread safe? - code analysis, flaw detection</i> status still Closed with 7 other changes


type: t
user: dkf
brief: Ticket [3027815fffffffff|3027815fff]: 4 changes
comment:
  Ticket [3027815fffffffff|3027815fff] <i>Safe interpreters can use Thread to execute unsafe commands</i> status still Open with 4 other changes


type: t
user: a_kovalenko
brief: New ticket [3026061fffffffff|3026061fff].
comment:
  New ticket [3026061fffffffff|3026061fff] <i>threadCmd.c:Init() references an interp but not preserves it</i>.


type: t
user: elfring
comment:
  Add attachment [/artifact/70afe5ba3b130e44|MonitoredExecutor.zip] to ticket [674367ffffffffff|674367ffff]


type: t
user: vasiljevic
brief: Closed ticket [3448556fffffffff|3448556fff].
comment:
  Closed ticket [3448556fffffffff|3448556fff]: <i>Segmentation fault on exit in tsv</i> plus 7 other changes


type: t
user: andreas_kupries
brief: Closed ticket [503451ffffffffff|503451ffff].
comment:
  Closed ticket [503451ffffffffff|503451ffff]: <i>Thread: Unknown &quot;ThreadKill&quot; function</i> plus 8 other changes


type: t
user: sf-robot
brief: Closed ticket [1634129fffffffff|1634129fff].
comment:
  Closed ticket [1634129fffffffff|1634129fff]: <i>bus error during gmake test </i> plus 6 other changes


type: t
user: dgp
brief: Closed ticket [3407947fffffffff|3407947fff].
comment:
  Closed ticket [3407947fffffffff|3407947fff]: <i>send to self appears to leak</i> plus 7 other changes


type: t
user: dgp
brief: Closed ticket [3411244fffffffff|3411244fff].
comment:
  Closed ticket [3411244fffffffff|3411244fff]: <i>[thread::release -wait [thread::id]] hangs</i> plus 7 other changes


type: t
user: sebres
brief: Ticket [3494470fffffffff|3494470fff]: 6 changes
comment:
  Ticket [3494470fffffffff|3494470fff] <i>called Tcl_FindHashEntry on deleted table</i> status still Open with 6 other changes


type: t
user: tombert
brief: Ticket [3129844fffffffff|3129844fff]: 4 changes
comment:
  Ticket [3129844fffffffff|3129844fff] <i>Crash on specific exit sequence</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Closed ticket [421246ffffffffff|421246ffff].
comment:
  Closed ticket [421246ffffffffff|421246ffff]: <i>Problem with unix compilation in thread/</i> plus 7 other changes


type: t
user: andreas_kupries
brief: Ticket [439581ffffffffff|439581ffff]: 3 changes
comment:
  Ticket [439581ffffffffff|439581ffff] <i>crash when application terminates</i> status still Closed with 3 other changes


type: t
user: dkf
brief: Ticket [2688159fffffffff|2688159fff]: 4 changes
comment:
  Ticket [2688159fffffffff|2688159fff] <i>Thread module fails to build against 8.6b1</i> status still Open with 4 other changes


type: t
user: davygrvy
brief: Closed ticket [418693ffffffffff|418693ffff].
comment:
  Closed ticket [418693ffffffffff|418693ffff]: <i>thread extension not resposible for this</i> plus 3 other changes


type: t
user: dgp
brief: Ticket [1860425fffffffff|1860425fff]: 1 change
comment:
  Ticket [1860425fffffffff|1860425fff] <i>core dump on FreeBSD, thread::create</i> status still Open with 1 other change


type: t
user: davygrvy
comment:
  Add attachment [/artifact/bdfb66aac726cab5|patch_thread_ext_add_finalize.txt] to ticket [418689ffffffffff|418689ffff]


type: t
user: hobbs
brief: Ticket [1267256fffffffff|1267256fff]: 1 change
comment:
  Ticket [1267256fffffffff|1267256fff] <i>enable static linking when TclX is present</i> status still Open with 1 other change


type: t
user: dgp
brief: Ticket [3447273fffffffff|3447273fff]: 4 changes
comment:
  Ticket [3447273fffffffff|3447273fff] <i>tpool::* commands respect interp limits</i> status still Open with 4 other changes


type: t
user: twylite
brief: Ticket [1643367fffffffff|1643367fff]: 4 changes
comment:
  Ticket [1643367fffffffff|1643367fff] <i>Thread extension cannot compile with VC8</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [3382401fffffffff|3382401fff]: 6 changes
comment:
  Ticket [3382401fffffffff|3382401fff] <i>Thread pool leaks memory</i> status still Open with 6 other changes


type: t
user: andreas_kupries
brief: Closed ticket [439581ffffffffff|439581ffff].
comment:
  Closed ticket [439581ffffffffff|439581ffff]: <i>crash when application terminates</i> plus 3 other changes


type: t
user: nyademo
brief: New ticket [1512225fffffffff|1512225fff].
comment:
  New ticket [1512225fffffffff|1512225fff] <i>tpool::wait and tpool::cancel set wrong value to variable</i>.


type: t
user: hobbs
brief: Closed ticket [1988779fffffffff|1988779fff].
comment:
  Closed ticket [1988779fffffffff|1988779fff]: <i>Tcl_SetStringObj called with shared object</i> plus 3 other changes


type: t
user: vasiljevic
brief: Ticket [1578877fffffffff|1578877fff]: 4 changes
comment:
  Ticket [1578877fffffffff|1578877fff] <i>thread::release treats hanging processes wrongly</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [219320ffffffffff|219320ffff]: 2 changes
comment:
  Ticket [219320ffffffffff|219320ffff] <i>Tcl_Finalize doesn&#39;t clean-up running threads</i> status still Closed with 2 other changes


type: t
user: vasiljevic
brief: Closed ticket [577014ffffffffff|577014ffff].
comment:
  Closed ticket [577014ffffffffff|577014ffff]: <i>documentation; wait on thread exits</i> plus 4 other changes


type: t
user: dkf
brief: Closed ticket [3033206fffffffff|3033206fff].
comment:
  Closed ticket [3033206fffffffff|3033206fff]: <i>lib/ttrace.tcl uses ::version as temporary variable</i> plus 8 other changes


type: t
user: andreas_kupries
comment:
  Add attachment [/artifact/4b3695af8fe6ddd0|thread-aix-delta] to ticket [3007426fffffffff|3007426fff]


type: t
user: mdejong
comment:
  Add attachment [/artifact/8b97f4a2f9cdc62c|tcl_stub_checker.c] to ticket [584123ffffffffff|584123ffff]


type: t
user: nijtmans
brief: Pending ticket [3543020fffffffff|3543020fff].
comment:
  Pending ticket [3543020fffffffff|3543020fff]: <i>Thread extension not building with makefile. when in release</i> plus 6 other changes


type: t
user: dgp
brief: Pending ticket [1521416fffffffff|1521416fff].
comment:
  Pending ticket [1521416fffffffff|1521416fff]: <i>thread::release on win32 does not release all memory</i> plus 8 other changes


type: t
user: dkf
brief: Closed ticket [1021053fffffffff|1021053fff].
comment:
  Closed ticket [1021053fffffffff|1021053fff]: <i>thread::transfer cause exception</i> plus 7 other changes


type: t
user: msofer
brief: Ticket [1965721fffffffff|1965721fff]: 1 change
comment:
  Ticket [1965721fffffffff|1965721fff] <i>memory corruption in thread pool ?</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Closed ticket [1267256fffffffff|1267256fff].
comment:
  Closed ticket [1267256fffffffff|1267256fff]: <i>enable static linking when TclX is present</i> plus 7 other changes


type: t
user: dgp
brief: Ticket [2980143fffffffff|2980143fff]: 1 change
comment:
  Ticket [2980143fffffffff|2980143fff] <i>support return options</i> status still Open with 1 other change


type: t
user: hobbs
brief: Closed ticket [1712723fffffffff|1712723fff].
comment:
  Closed ticket [1712723fffffffff|1712723fff]: <i>joinable threads die on Solaris 64-bit</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [2833864fffffffff|2833864fff].
comment:
  Closed ticket [2833864fffffffff|2833864fff]: <i>tpool::create crashes on 64-bit Vista</i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [1505810fffffffff|1505810fff].
comment:
  Closed ticket [1505810fffffffff|1505810fff]: <i>init.tcl not found in thread interpreter </i> plus 7 other changes


type: t
user: vasiljevic
brief: Closed ticket [1163357fffffffff|1163357fff].
comment:
  Closed ticket [1163357fffffffff|1163357fff]: <i>build dir outside source dir not supported</i> plus 7 other changes


type: t
user: vasiljevic
brief: Ticket [1095370fffffffff|1095370fff]: 2 changes
comment:
  Ticket [1095370fffffffff|1095370fff] <i>tpool doesn&#39;t respect -minworkers</i> status still Closed with 2 other changes


type: t
user: nijtmans
brief: Closed ticket [3543020fffffffff|3543020fff].
comment:
  Closed ticket [3543020fffffffff|3543020fff]: <i>Thread extension not building with makefile. when in release</i> plus 6 other changes


type: t
user: vasiljevic
brief: Ticket [1521416fffffffff|1521416fff]: 5 changes
comment:
  Ticket [1521416fffffffff|1521416fff] <i>thread::release on win32 does not release all memory</i> status still Open with 5 other changes


type: t
user: lvirden
brief: Ticket [1712723fffffffff|1712723fff]: 5 changes
comment:
  Ticket [1712723fffffffff|1712723fff] <i>thread.test bus error on sparc solaris 9</i> status still Open with 5 other changes


type: t
user: davygrvy
brief: Ticket [416850ffffffffff|416850ffff]: 1 change
comment:
  Ticket [416850ffffffffff|416850ffff] <i>undocumented commands</i> status still Open with 1 other change


type: t
user: vasiljevic
brief: Closed ticket [1464731fffffffff|1464731fff].
comment:
  Closed ticket [1464731fffffffff|1464731fff]: <i>Memory leak in Thread release</i> plus 7 other changes


type: t
user: nijtmans
brief: Pending ticket [3543020fffffffff|3543020fff].
comment:
  Pending ticket [3543020fffffffff|3543020fff]: <i>Thread extension not building with makefile. when in release</i> plus 8 other changes


type: t
user: andreas_kupries
brief: Closed ticket [503446ffffffffff|503446ffff].
comment:
  Closed ticket [503446ffffffffff|503446ffff]: <i>Thread: Installation of headers fails</i> plus 3 other changes


type: t
user: elfring
brief: Open ticket [659131ffffffffff|659131ffff].
comment:
  Open ticket [659131ffffffffff|659131ffff]: <i>development targets: Complete pthreads?</i> plus 4 other changes


type: t
user: oehhar
brief: Closed ticket [3567104fffffffff|3567104fff].
comment:
  Closed ticket [3567104fffffffff|3567104fff]: <i>pkgIndex.tcl bronken when building with Makefile.vc</i> plus 3 other changes


type: t
user: andreas_kupries
brief: Ticket [503446ffffffffff|503446ffff]: 4 changes
comment:
  Ticket [503446ffffffffff|503446ffff] <i>Installation of headers fails</i> status still Open with 4 other changes


type: t
user: dgp
brief: Closed ticket [3563391fffffffff|3563391fff].
comment:
  Closed ticket [3563391fffffffff|3563391fff]: <i>Drop unused SpBucket fields</i> plus 7 other changes


type: t
user: tomkiti
brief: Ticket [3534607fffffffff|3534607fff]: 4 changes
comment:
  Ticket [3534607fffffffff|3534607fff] <i>tpool::get sets errorInfo incorrectly</i> status still Open with 4 other changes


type: t
user: hobbs
brief: Ticket [1712723fffffffff|1712723fff]: 6 changes
comment:
  Ticket [1712723fffffffff|1712723fff] <i>joinable threads die on Solaris 64-bit</i> status still Open with 6 other changes


type: t
user: vasiljevic
brief: Closed ticket [1358496fffffffff|1358496fff].
comment:
  Closed ticket [1358496fffffffff|1358496fff]: <i>ttrace::eval &quot;wrong # args: should be &quot;proc name args body&quot;&quot;</i> plus 7 other changes


type: t
user: elfring
comment:
  Add attachment [/artifact/8d9dd93c5766cac4|tclPosixThread.zip] to ticket [659131ffffffffff|659131ffff]


type: t
user: ctasada
brief: Ticket [1523697fffffffff|1523697fff]: 2 changes
comment:
  Ticket [1523697fffffffff|1523697fff] <i>Crash using clock commands in a Thread using VFS</i> status still Open with 2 other changes


type: t
user: sebres
brief: Pending ticket [3494470fffffffff|3494470fff].
comment:
  Pending ticket [3494470fffffffff|3494470fff]: <i>called Tcl_FindHashEntry on deleted table</i> plus 2 other changes


type: t
user: vasiljevic
brief: Closed ticket [2979572fffffffff|2979572fff].
comment:
  Closed ticket [2979572fffffffff|2979572fff]: <i>compiler warnings threadSpCmd.c</i> plus 6 other changes


type: t
user: dkf
brief: Ticket [406058ffffffffff|406058ffff]: 1 change
comment:
  Ticket [406058ffffffffff|406058ffff] <i>Bug in thread library</i> status still Open with 1 other change


type: t
user: auriocus
comment:
  Add attachment [/artifact/16f3c1b515df64a2|threadpool_leakdemo84_fast.tcl] to ticket [3382401fffffffff|3382401fff]


type: t
user: nobody
brief: New ticket [2050025fffffffff|2050025fff].
comment:
  New ticket [2050025fffffffff|2050025fff] <i>Threads extension fails to install in custom location</i>.


type: t
user: oehhar
brief: New ticket [3567104fffffffff|3567104fff].
comment:
  New ticket [3567104fffffffff|3567104fff] <i>pkgIndex.tcl bronken when building with Makefile.vc</i>.


type: t
user: arius-marius
brief: New ticket [3532972fffffffff|3532972fff].
comment:
  New ticket [3532972fffffffff|3532972fff] <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i>.


type: t
user: twylite
brief: New ticket [1689375fffffffff|1689375fff].
comment:
  New ticket [1689375fffffffff|1689375fff] <i>Update VC makefile for Threads (Fix for bug 1643367)</i>.


type: t
user: tombert
comment:
  Add attachment [/artifact/56dac3657d5db3b4|socket_crash.itcl] to ticket [3301634fffffffff|3301634fff]


type: t
user: ferrieux
brief: Closed ticket [1759529fffffffff|1759529fff].
comment:
  Closed ticket [1759529fffffffff|1759529fff]: <i>Thread tests fails on netbsd</i> plus 7 other changes


type: t
user: ferrieux
brief: Ticket [486399ffffffffff|486399ffff]: 5 changes
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Panic on exit before all threads returned</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Closed ticket [1095370fffffffff|1095370fff].
comment:
  Closed ticket [1095370fffffffff|1095370fff]: <i>tpool doesn&#39;t respect -minworkers</i> plus 1 other change


type: t
user: davygrvy
brief: Ticket [418693ffffffffff|418693ffff]: 4 changes
comment:
  Ticket [418693ffffffffff|418693ffff] <i>thread extension not resposible for this</i> status still Open with 4 other changes


type: t
user: dgp
brief: Ticket [3411242fffffffff|3411242fff]: 4 changes
comment:
  Ticket [3411242fffffffff|3411242fff] <i>[thread::release -wait] crashes</i> status still Open with 4 other changes


type: t
user: dgp
brief: Closed ticket [1603234fffffffff|1603234fff].
comment:
  Closed ticket [1603234fffffffff|1603234fff]: <i>Memory leak with thread::transfer</i> plus 7 other changes


type: t
user: dkf
brief: Ticket [486399ffffffffff|486399ffff]: 4 changes
comment:
  Ticket [486399ffffffffff|486399ffff] <i>Panic on exit before all threads returned</i> status still Closed with 4 other changes


type: t
user: hobbs
brief: Closed ticket [1934666fffffffff|1934666fff].
comment:
  Closed ticket [1934666fffffffff|1934666fff]: <i>Core dump when using &#39;clock format ...&#39; in a thread</i> plus 3 other changes


type: t
user: vasiljevic
brief: Ticket [1095370fffffffff|1095370fff]: 4 changes
comment:
  Ticket [1095370fffffffff|1095370fff] <i>tpool doesn&#39;t respect -minworkers</i> status still Closed with 4 other changes


type: t
user: vasiljevic
brief: Ticket [1095370fffffffff|1095370fff]: 4 changes
comment:
  Ticket [1095370fffffffff|1095370fff] <i>tpool doesn&#39;t respect -minworkers</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Ticket [1051068fffffffff|1051068fff]: 7 changes
comment:
  Ticket [1051068fffffffff|1051068fff] <i>Testsuite crashes, Windows, 8.4</i> status still Closed with 7 other changes


type: t
user: tomkiti
brief: Ticket [3534581fffffffff|3534581fff]: 4 changes
comment:
  Ticket [3534581fffffffff|3534581fff] <i>tpool::post -nowait still waits</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [1356721fffffffff|1356721fff].
comment:
  Closed ticket [1356721fffffffff|1356721fff]: <i>tcl8.5a3 segfault foreach loop thread creation</i> plus 7 other changes


type: t
user: elfring
brief: Ticket [659131ffffffffff|659131ffff]: 5 changes
comment:
  Ticket [659131ffffffffff|659131ffff] <i>development targets: Complete pthreads?</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Closed ticket [634845ffffffffff|634845ffff].
comment:
  Closed ticket [634845ffffffffff|634845ffff]: <i>thread::sync crashes on errors</i> plus 3 other changes


type: t
user: andreas_kupries
brief: Ticket [3007426fffffffff|3007426fff]: 4 changes
comment:
  Ticket [3007426fffffffff|3007426fff] <i>Build failure on AIX</i> status still Open with 4 other changes


type: t
user: vasiljevic
brief: Closed ticket [487213ffffffffff|487213ffff].
comment:
  Closed ticket [487213ffffffffff|487213ffff]: <i>Thread does not build with Tcl 8.3</i> plus 3 other changes


type: t
user: furukawa
comment:
  Add attachment [/artifact/5fcbaa8bf15eb1a2|thread2.6.1-aclocal.m4.patch] to ticket [1245204fffffffff|1245204fff]


type: t
user: dharan
comment:
  Add attachment [/artifact/d9df6e4b1d9ae80d|SampleTestuite2.itcl] to ticket [1449383fffffffff|1449383fff]


type: t
user: andreas_kupries
brief: Closed ticket [1021078fffffffff|1021078fff].
comment:
  Closed ticket [1021078fffffffff|1021078fff]: <i>thread::transfer cause exception (TIP #218)</i> plus 7 other changes


type: t
user: davygrvy
brief: Ticket [418689ffffffffff|418689ffff]: 1 change
comment:
  Ticket [418689ffffffffff|418689ffff] <i>Tcl_FinalizeThread missing</i> status still Open with 1 other change


type: t
user: elfring
comment:
  Add attachment [/artifact/cc0ada06d3a4a6ba|tclPosixThread3.tar.gz] to ticket [659131ffffffffff|659131ffff]


type: t
user: vasiljevic
brief: Ticket [1021078fffffffff|1021078fff]: 5 changes
comment:
  Ticket [1021078fffffffff|1021078fff] <i>thread::transfer cause exception</i> status still Open with 5 other changes


type: t
user: wobster
brief: New ticket [884549ffffffffff|884549ffff].
comment:
  New ticket [884549ffffffffff|884549ffff] <i>Segmentation fault returning value in Thread for Thread 2.5</i>.


type: t
user: tombert
brief: Ticket [3301634fffffffff|3301634fff]: 5 changes
comment:
  Ticket [3301634fffffffff|3301634fff] <i>Thread release crash</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Ticket [3534440fffffffff|3534440fff]: 5 changes
comment:
  Ticket [3534440fffffffff|3534440fff] <i>tpool::wait does not return pending jobs</i> status still Open with 5 other changes


type: t
user: vasiljevic
brief: Closed ticket [1578877fffffffff|1578877fff].
comment:
  Closed ticket [1578877fffffffff|1578877fff]: <i>thread::release treats hanging processes wrongly</i> plus 7 other changes


type: t
user: nobody
brief: New ticket [1521416fffffffff|1521416fff].
comment:
  New ticket [1521416fffffffff|1521416fff] <i>thread::release on win32 does not release all memory</i>.


type: t
user: vasiljevic
brief: Closed ticket [2005794fffffffff|2005794fff].
comment:
  Closed ticket [2005794fffffffff|2005794fff]: <i>tpool::create freezes when using minworkers</i> plus 7 other changes


type: ci
user: jan.nijtmans
comment:
  Ticket [http://core.tcl.tk/tclconfig/tktview?name=00ed054f4f|00ed054f4f]: Search in Debian per-version directories


type: t
user: anonymous
brief: New ticket [4e30d60da7d105bd|4e30d60da7].
comment:
  New ticket [4e30d60da7d105bd|4e30d60da7] <i>Error message is doubled in -errorinfo in rethrown exception using tpool::get</i>.


type: t
user: anonymous
brief: Ticket [4e30d60da7d105bd|4e30d60da7]: 4 changes
comment:
  Ticket [4e30d60da7d105bd|4e30d60da7] <i>Error message is doubled in -errorinfo in rethrown exception using tpool::get</i> status still Open with 4 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [3534607fffffffff|3534607fff].
comment:
  Closed ticket [3534607fffffffff|3534607fff]: <i>tpool::get sets errorInfo incorrectly</i> plus 8 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [4e30d60da7d105bd|4e30d60da7].
comment:
  Closed ticket [4e30d60da7d105bd|4e30d60da7]: <i>Error message is doubled in -errorinfo in rethrown exception using tpool::get</i> plus 7 other changes


type: t
user: stwo
brief: Ticket [41922d3bb7c43da1|41922d3bb7]: 3 changes
comment:
  Ticket [41922d3bb7c43da1|41922d3bb7] <i>Please regenerate the docs.</i> status still Open with 3 other changes


type: ci
user: andreask
comment:
  Added conditional definition of MODULE_SCOPE for cases where it does
  not exist (Building basekits, tclkits, with Thread directly compiled
  in). This required modification of some header inclusions as well, to
  have the definition in one place instead of about four.

  Added conditional definition of Tcl_GetErrorLine for the same
  reason. Under static build -DTCL_TIP285 is not usable, as
  USE_TCL_STUBS will be missing. And the TGEL changes are TIP 336 also,
  i.e. unrelated.

  And lastly added conditional definition of the package version, again
  for cases where it is missing due to Thread configure not invoked.


type: t
user: anonymous
brief: Ticket [9ab808b663918273|9ab808b663]: 5 changes
comment:
  Ticket [9ab808b663918273|9ab808b663] <i>Segmentation fault on ::tsv::names</i> status still Open with 5 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [9ab808b663918273|9ab808b663].
comment:
  Closed ticket [9ab808b663918273|9ab808b663]: <i>Segmentation fault on ::tsv::names</i> plus 7 other changes


type: t
user: anonymous
brief: Ticket [9ab808b663918273|9ab808b663]: 6 changes
comment:
  Ticket [9ab808b663918273|9ab808b663] <i>Segmentation fault on ::tsv::names</i> status still Closed with 6 other changes


type: t
user: dgp
brief: Ticket [a57b6c3fd438ec07|a57b6c3fd4]: 4 changes
comment:
  Ticket [a57b6c3fd438ec07|a57b6c3fd4] <i>-eventmark + thread::send -async == deadlock</i> status still Open with 4 other changes


type: t
user: stwo
brief: New ticket [c9d81a5d49fbbe92|c9d81a5d49].
comment:
  New ticket [c9d81a5d49fbbe92|c9d81a5d49] <i>Patch for &#39;discards qualifiers from pointer target type&#39; compiler warning</i>.


type: t
user: stwo
brief: Ticket [c9d81a5d49fbbe92|c9d81a5d49]: 3 changes
comment:
  Ticket [c9d81a5d49fbbe92|c9d81a5d49] <i>Patch for &#39;discards qualifiers from pointer target type&#39; compiler warning</i> status still Open with 3 other changes


type: ci
user: jan.nijtmans
comment:
  Fix [https://www.sqlite.org/src/info/34eb6911afee09e7|34eb6911af], taken over from SQLite: Fix uses of ctype functions (ex: isspace()) on signed characters in test programs and in some obscure extensions. No changes to the core.


type: ci
user: andreask
comment:
  Fix Thread breakage when compiled and linked for static. Avoid usage of the stubs table for that case.


type: t
user: sebres
brief: New ticket [78a870b0d1ce3edf|78a870b0d1].
comment:
  New ticket [78a870b0d1ce3edf|78a870b0d1] <i>tsv::lappend - extreme growth of execution time (not linear, dependent on list size)</i>.


type: t
user: sebres
brief: Ticket [78a870b0d1ce3edf|78a870b0d1]: 3 changes
comment:
  Ticket [78a870b0d1ce3edf|78a870b0d1] <i>tsv::lappend - extreme growth of execution time (not linear, dependent on list size)</i> status still Open with 3 other changes


type: t
user: sebres
brief: Pending ticket [78a870b0d1ce3edf|78a870b0d1].
comment:
  Pending ticket [78a870b0d1ce3edf|78a870b0d1]: <i>tsv::lappend - extreme growth of execution time (not linear, dependent on list size)</i> plus 4 other changes


type: t
user: sebres
brief: Closed ticket [78a870b0d1ce3edf|78a870b0d1].
comment:
  Closed ticket [78a870b0d1ce3edf|78a870b0d1]: <i>tsv::lappend - extreme growth of execution time (not linear, dependent on list size)</i> plus 6 other changes


type: t
user: sebres
brief: Closed ticket [3493120fffffffff|3493120fff].
comment:
  Closed ticket [3493120fffffffff|3493120fff]: <i>Thread extension, memory leak after thread exit</i> plus 9 other changes


type: t
user: sebres
brief: Closed ticket [3494470fffffffff|3494470fff].
comment:
  Closed ticket [3494470fffffffff|3494470fff]: <i>called Tcl_FindHashEntry on deleted table</i> plus 6 other changes


type: t
user: sebres
brief: Closed ticket [1745928fffffffff|1745928fff].
comment:
  Closed ticket [1745928fffffffff|1745928fff]: <i>thread&#39;s memory isn&#39;t being released</i> plus 8 other changes


type: t
user: anonymous
brief: Ticket [3532972fffffffff|3532972fff]: 8 changes
comment:
  Ticket [3532972fffffffff|3532972fff] <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i> status still Open with 8 other changes


type: t
user: jan.nijtmans
brief: Ticket [3532972fffffffff|3532972fff]: 3 changes
comment:
  Ticket [3532972fffffffff|3532972fff] <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i> status still Open with 3 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [a57b6c3fd438ec07|a57b6c3fd4].
comment:
  Closed ticket [a57b6c3fd438ec07|a57b6c3fd4]: <i>-eventmark + thread::send -async == deadlock</i> plus 6 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [c9d81a5d49fbbe92|c9d81a5d49].
comment:
  Closed ticket [c9d81a5d49fbbe92|c9d81a5d49]: <i>Patch for &#39;discards qualifiers from pointer target type&#39; compiler warning</i> plus 7 other changes


type: ci
user: gahr
comment:
  Initial LMDB persistent storage support.

  This commit adds support for using LMDB as a persistent storage. The
  implementation resides in generic/psLmdb.(c|h). Autoconf scripts have been
  updated to accept the new --with-lmdb argument. In doing this, I will also
  add tsv-related tests to the (previously empty) tsv.test file.


type: t
user: gahr
brief: New ticket [a135697d8cea09bc|a135697d8c].
comment:
  New ticket [a135697d8cea09bc|a135697d8c] <i>Avoid double query to persistent storage in tsv::array bind</i>.


type: t
user: gahr
comment:
  Add attachment [/artifact/f97451712f2e1ac3|ticket-a135697d8c.diff.txt] to ticket [a135697d8cea09bc|a135697d8c]


type: t
user: gahr
brief: Ticket [a135697d8cea09bc|a135697d8c]: 1 change
comment:
  Ticket [a135697d8cea09bc|a135697d8c] <i>Avoid double query to persistent storage in tsv::array bind</i> status still Open with 1 other change


type: t
user: gahr
brief: Ticket [be135da5f91179a2|be135da5f9]: 1 change
comment:
  Ticket [be135da5f91179a2|be135da5f9] <i>Document side-effect of [tsv::array unbind]</i> status still Open with 1 other change


type: t
user: gahr
brief: Ticket [f8ff429a39761534|f8ff429a39]: 1 change
comment:
  Ticket [f8ff429a39761534|f8ff429a39] <i>Configure flag --without-gdbm not handled properly</i> status still Open with 1 other change


type: t
user: gahr
brief: Closed ticket [f8ff429a39761534|f8ff429a39].
comment:
  Closed ticket [f8ff429a39761534|f8ff429a39]: <i>Configure flag --without-gdbm not handled properly</i> plus 5 other changes


type: t
user: gahr
brief: Closed ticket [be135da5f91179a2|be135da5f9].
comment:
  Closed ticket [be135da5f91179a2|be135da5f9]: <i>Document side-effect of [tsv::array unbind]</i> plus 5 other changes


type: t
user: gahr
brief: Closed ticket [41922d3bb7c43da1|41922d3bb7].
comment:
  Closed ticket [41922d3bb7c43da1|41922d3bb7]: <i>Please regenerate the docs.</i> plus 5 other changes


type: t
user: gahr
brief: Closed ticket [a135697d8cea09bc|a135697d8c].
comment:
  Closed ticket [a135697d8cea09bc|a135697d8c]: <i>Avoid double query to persistent storage in tsv::array bind</i> plus 5 other changes


type: t
user: gahr
brief: Closed ticket [9378bb6795e6ab5d|9378bb6795].
comment:
  Closed ticket [9378bb6795e6ab5d|9378bb6795]: <i>Add support for LMDB persistent storage</i> plus 6 other changes


type: t
user: gahr
brief: Ticket [84be1b5a73e57faf|84be1b5a73]: 4 changes
comment:
  Ticket [84be1b5a73e57faf|84be1b5a73] <i>segfault with -async and result trace</i> status still Open with 4 other changes


type: t
user: gahr
comment:
  Add attachment [/artifact/5769383127bc3e31|84be1b5a73.diff.txt] to ticket [84be1b5a73e57faf|84be1b5a73]


type: t
user: gahr
comment:
  Add attachment [/artifact/47cc4837b60b3e2f|3532972fff.diff.txt] to ticket [3532972fffffffff|3532972fff]


type: t
user: gahr
brief: Closed ticket [84be1b5a73e57faf|84be1b5a73].
comment:
  Closed ticket [84be1b5a73e57faf|84be1b5a73]: <i>segfault with -async and result trace</i> plus 6 other changes


type: t
user: gahr
comment:
  Add attachment [/artifact/875fff8aebb90554|3532972fff-2.diff.txt] to ticket [3532972fffffffff|3532972fff]


type: t
user: adrianmedranocalvo
comment:
  Add attachment [/artifact/77b93f020888c4e8|3532972fff-3.patch] to ticket [3532972fffffffff|3532972fff]


type: t
user: gahr
brief: Closed ticket [3532972fffffffff|3532972fff].
comment:
  Closed ticket [3532972fffffffff|3532972fff]: <i>Tcl Scripts results in &quot;called Tcl_FindHashEntry on deleted&quot;</i> plus 6 other changes


type: t
user: gahr
comment:
  Add attachment [/artifact/12d2a083f96d7b3f|3407860fff.diff.txt] to ticket [3407860fffffffff|3407860fff]


type: t
user: gahr
brief: Ticket [3407860fffffffff|3407860fff]: 7 changes
comment:
  Ticket [3407860fffffffff|3407860fff] <i>thread::exit flaws</i> status still Open with 7 other changes


type: t
user: dgp
brief: Ticket [3407860fffffffff|3407860fff]: 5 changes
comment:
  Ticket [3407860fffffffff|3407860fff] <i>thread::exit flaws</i> status still Closed with 5 other changes


type: t
user: gahr
brief: Ticket [72b8ee4c76fb5e24|72b8ee4c76]: 4 changes
comment:
  Ticket [72b8ee4c76fb5e24|72b8ee4c76] <i>tsn-lmdb tests fail</i> status still Open with 4 other changes


type: ci
user: gahr
comment:
  Implement [tsv::handlers] to make the list of compiled persistent storage
  handlers available at script level. Adjust the test suite to leverage on this
  to provide constraints. Update documentation and ChangeLog.


type: ci
user: gahr
comment:
  [72b8ee4c76] Implement [tsv::handlers] to make the list of compiled persistent
  storage handlers available at script level. Adjust the test suite to leverage
  on this to provide constraints. Update documentation and ChangeLog.


type: t
user: dgp
brief: Ticket [b35544d2c8785226|b35544d2c8]: 3 changes
comment:
  Ticket [b35544d2c8785226|b35544d2c8] <i>Update version(s) in docs</i> status still Open with 3 other changes


type: t
user: dgp
brief: Ticket [b35544d2c8785226|b35544d2c8]: 5 changes
comment:
  Ticket [b35544d2c8785226|b35544d2c8] <i>Update version(s) in docs</i> status still Closed with 5 other changes


type: t
user: dgp
brief: New ticket [4a8a7fbb1ff6302d|4a8a7fbb1f].
comment:
  New ticket [4a8a7fbb1ff6302d|4a8a7fbb1f] <i>Thread package fails to consider the interp it was initially loaded from was deleted</i>.


type: t
user: dgp
brief: Ticket [4a8a7fbb1ff6302d|4a8a7fbb1f]: 3 changes
comment:
  Ticket [4a8a7fbb1ff6302d|4a8a7fbb1f] <i>Thread package fails to consider the interp it was initially loaded from was deleted</i> status still Open with 3 other changes


type: t
user: gahr
brief: Ticket [4a8a7fbb1ff6302d|4a8a7fbb1f]: 4 changes
comment:
  Ticket [4a8a7fbb1ff6302d|4a8a7fbb1f] <i>Thread package fails to consider the interp it was initially loaded from was deleted</i> status still Open with 4 other changes


type: g
user: hypnotoad
comment:
  Edit [b538bbe92fac81ac|b538bbe92f]: Move to branch [/timeline?r=practcl&nd&dp=b538bbe92fac81ac&unhide | practcl].


type: ci
user: tne
comment:
  Added a mechanism to auto-populate the tclconfig directory on ./configure

  ./configure now populates a standard config.tcl definition


type: ci
user: gahr
comment:
  Do not use a static array to store handlers names. This solves the problem of
  an invalid empty initialization list when no handlers are available.


type: g
user: dgp
comment:
  Edit [70528a315be3dedc|70528a315b]: Move to branch [/timeline?r=trunk-fork&nd&dp=70528a315be3dedc&unhide | trunk-fork].


type: t
user: karl
brief: New ticket [414d74e9178ddc35|414d74e917].
comment:
  New ticket [414d74e9178ddc35|414d74e917] <i>Provide a way to see how many asynchronously posted scripts are pending on the thread event loop</i>.


type: t
user: bovine
brief: New ticket [d9c95d3ed3f9c67d|d9c95d3ed3].
comment:
  New ticket [d9c95d3ed3f9c67d|d9c95d3ed3] <i>tpool::post -nowait does not ever create more than 1 worker thread</i>.


type: t
user: bovine
comment:
  Add attachment [/artifact/acb30cad5ab08ada|tpool_nowait_bug.tcl] to ticket [d9c95d3ed3f9c67d|d9c95d3ed3]


type: t
user: bovine
brief: New ticket [646509f34f5e2587|646509f34f].
comment:
  New ticket [646509f34f5e2587|646509f34f] <i>tpool::release/post can hang if thread::exit is used</i>.


type: t
user: bovine
comment:
  Add attachment [/artifact/d58ef7af2048fe64|tpool_threxit_bug1.tcl] to ticket [646509f34f5e2587|646509f34f]


type: t
user: bovine
comment:
  Add attachment [/artifact/1698a21658349bb0|tpool_threxit_bug2.tcl] to ticket [646509f34f5e2587|646509f34f]


type: t
user: bovine
comment:
  Add attachment [/artifact/a0fe4b6f9b583570|post-cmd-segfault.diff] to ticket [63c86edf71cff8a7|63c86edf71]


type: t
user: bovine
brief: New ticket [e3061ac9b6f11d4e|e3061ac9b6].
comment:
  New ticket [e3061ac9b6f11d4e|e3061ac9b6] <i>Provide a way to wait for all queued jobs to finish</i>.


type: t
user: bovine
brief: Ticket [e3061ac9b6f11d4e|e3061ac9b6]: 3 changes
comment:
  Ticket [e3061ac9b6f11d4e|e3061ac9b6] <i>Provide a way to wait for all queued jobs to finish</i> status still Open with 3 other changes


type: t
user: dgp
brief: Ticket [63c86edf71cff8a7|63c86edf71]: 4 changes
comment:
  Ticket [63c86edf71cff8a7|63c86edf71] <i>segfault in argument parsing of tpool::post</i> status still Open with 4 other changes


type: t
user: gahr
brief: Closed ticket [63c86edf71cff8a7|63c86edf71].
comment:
  Closed ticket [63c86edf71cff8a7|63c86edf71]: <i>segfault in argument parsing of tpool::post</i> plus 7 other changes


type: t
user: bovine
brief: Ticket [3fe61dda61e0ebd5|3fe61dda61]: 3 changes
comment:
  Ticket [3fe61dda61e0ebd5|3fe61dda61] <i>Documentation spelling fixes</i> status still Open with 3 other changes


type: t
user: gahr
brief: Closed ticket [3fe61dda61e0ebd5|3fe61dda61].
comment:
  Closed ticket [3fe61dda61e0ebd5|3fe61dda61]: <i>Documentation spelling fixes</i> plus 7 other changes


type: t
user: RP.
brief: Ticket [b83d31c49a5580c8|b83d31c49a]: 4 changes
comment:
  Ticket [b83d31c49a5580c8|b83d31c49a] <i>file exists, mtime... procedures leaks in threads</i> status still Open with 4 other changes


type: t
user: RP.
brief: Deleted ticket [b83d31c49a5580c8|b83d31c49a].
comment:
  Deleted ticket [b83d31c49a5580c8|b83d31c49a]: <i>file exists, mtime... procedures leaks in threads</i> plus 7 other changes


type: t
user: jan.nijtmans
brief: Closed ticket [1267256fffffffff|1267256fff].
comment:
  Closed ticket [1267256fffffffff|1267256fff]: <i>enable static linking when TclX is present</i> plus 8 other changes


type: ci
bgcolor: #efb0b0
user: sebres
comment:
  [win] allow lmdb (persistent storage) handler, if compiling for windows: ADDLINKOPTS and ADDOPTDEFINES can be specified to provide extra link- and compiler-options, for example:
    nmake -nologo -f makefile.vc TCLDIR=%TCLDIR% ... ADDOPTDEFINES="-I%LMDBDIR%" ADDLINKOPTS="%LMDBDIR%\Release\lmdb.lib"


type: ci
bgcolor: #ffc0d0
user: sebres
comment:
  leave entries in persistent bound storage on exit handler (avoid flushing data by delete array, causes if tcl-application properly exits with call of all exit-handlers);
  additionally fixes memory leak on arrayPtr->bindAddr by unbind;


type: t
user: tombert
brief: Ticket [44499074cb431338|44499074cb]: 5 changes
comment:
  Ticket [44499074cb431338|44499074cb] <i>SIGSEGV under heavy load</i> status still Open with 5 other changes


type: t
user: sebres
brief: Ticket [44499074cb431338|44499074cb]: 3 changes
comment:
  Ticket [44499074cb431338|44499074cb] <i>SIGSEGV under heavy load</i> status still Open with 3 other changes


type: t
user: tombert
brief: New ticket [1e3409bf1c6d0c1a|1e3409bf1c].
comment:
  New ticket [1e3409bf1c6d0c1a|1e3409bf1c] <i>Endless loop in tkTextDisp.c - cyclic references in dlPtr-&gt;nextPtr</i>.


type: t
user: sebres
brief: Ticket [1e3409bf1c6d0c1a|1e3409bf1c]: 3 changes
comment:
  Ticket [1e3409bf1c6d0c1a|1e3409bf1c] <i>Endless loop in tkTextDisp.c - cyclic references in dlPtr-&gt;nextPtr</i> status still Open with 3 other changes


type: t
user: tombert
brief: Ticket [1e3409bf1c6d0c1a|1e3409bf1c]: 3 changes
comment:
  Ticket [1e3409bf1c6d0c1a|1e3409bf1c] <i>SIGSEGV or endless loop in tkTextDisp.c - cyclic references in dlPtr-&gt;nextPtr</i> status still Open with 3 other changes


type: t
user: tombert
brief: Closed ticket [1e3409bf1c6d0c1a|1e3409bf1c].
comment:
  Closed ticket [1e3409bf1c6d0c1a|1e3409bf1c]: <i>SIGSEGV or endless loop in tkTextDisp.c - cyclic references in dlPtr-&gt;nextPtr</i> plus 5 other changes


type: t
user: sebres
brief: Ticket [770add1891d9e8d8|770add1891]: 4 changes
comment:
  Ticket [770add1891d9e8d8|770add1891] <i>Flushing of persistent storage + mem-leak fix</i> status still Open with 4 other changes


type: t
user: conej730
brief: Ticket [d9c95d3ed3f9c67d|d9c95d3ed3]: 4 changes
comment:
  Ticket [d9c95d3ed3f9c67d|d9c95d3ed3] <i>tpool::post -nowait does not ever create more than 1 worker thread</i> status still Open with 4 other changes


type: t
user: bovine
brief: Ticket [d9c95d3ed3f9c67d|d9c95d3ed3]: 3 changes
comment:
  Ticket [d9c95d3ed3f9c67d|d9c95d3ed3] <i>tpool::post -nowait does not ever create more than 1 worker thread</i> status still Open with 3 other changes


type: ci
user: jan.nijtmans
comment:
  Make nmakehlp return non-0 exit code if version not found. (taken over from vc-reform branch, good idea!). Remove some win98-specific hacks: win98 is not supported any more.


type: ci
user: jan.nijtmans
comment:
  Make "thread" compile after TIP #422 changes. See: [http://core.tcl.tk/tips/doc/trunk/tip/422.md|TIP #422]


type: t
user: jan.nijtmans
brief: Closed ticket [8a8155b0e1eb386a|8a8155b0e1].
comment:
  Closed ticket [8a8155b0e1eb386a|8a8155b0e1]: <i>compiler warning - looks serious</i> plus 7 other changes


type: t
user: sebres
brief: Closed ticket [770add1891d9e8d8|770add1891].
comment:
  Closed ticket [770add1891d9e8d8|770add1891]: <i>Flushing of persistent storage + mem-leak fix</i> plus 5 other changes


type: ci
user: apnadkarni
comment:
  Make resource file version and file name definitions fall back to
  macros defined in TEA if the newer nmake-based macros are not defined.
  Note the TEA build does not actually use the resource file, but
  just in case it is added in the future.
  Updated build instructions in README.


type: ci
user: jan.nijtmans
comment:
  Update to latest nmake build system and TEA. bump version. No longer allow Thread 2.8 to be loaded in Tcl 9.0: It doesn't work any more due to the remove stub entries there.


type: ci
user: jan.nijtmans
comment:
  Make threadWin compile with TCL_NO_DEPRECATED Tcl header files. (then CHAR/VOID e.d. should be provided by <windows.h>)


type: t
user: jan.nijtmans
brief: Closed ticket [10401858b07066ec|10401858b0].
comment:
  Closed ticket [10401858b07066ec|10401858b0]: <i>Thread package configure fails with Tcl 9</i> plus 7 other changes


type: ci
user: jan.nijtmans
comment:
  Renumber to 2.9a1. Make it loadable on both Tcl 8.x and 9.0 on 32-bit platforms, provided Thread is compiled with -DTCL_NO_DEPRECATED=1 (experimental)


type: ci
user: jan.nijtmans
comment:
  Make Thread run on Tcl 8.7 with -DTCL_NO_DEPRECATED, even if compiled against Tcl 8.6 headers. Clean up some #ifdef-ery, adding more comments.


type: t
user: sebres
brief: Closed ticket [c72c2eb54b644dc5|c72c2eb54b].
comment:
  Closed ticket [c72c2eb54b644dc5|c72c2eb54b]: <i>Invalid channel names in thread</i> plus 6 other changes


type: t
user: dgp
brief: New ticket [c6057948e5f88443|c6057948e5].
comment:
  New ticket [c6057948e5f88443|c6057948e5] <i>tsv commands break thread access rules for Tcl values</i>.


type: t
user: dgp
brief: Ticket [c6057948e5f88443|c6057948e5]: 3 changes
comment:
  Ticket [c6057948e5f88443|c6057948e5] <i>tsv commands break thread access rules for Tcl values</i> status still Open with 3 other changes


type: t
user: dgp
brief: Ticket [c6057948e5f88443|c6057948e5]: 4 changes
comment:
  Ticket [c6057948e5f88443|c6057948e5] <i>tsv commands break thread access rules for Tcl values</i> status still Open with 4 other changes


type: t
user: pooryorick
brief: New ticket [76f47e0376fb8b27|76f47e0376].
comment:
  New ticket [76f47e0376fb8b27|76f47e0376] <i>thread::send -async script varname aborts with &quot;alloc: invalid block&quot;</i>.


type: ci
user: sebres
comment:
  more extensive fix for [76f47e0376fb] and similar errors (additionally avoid segfault if string representation would be broken, e. g. without NTS 0-byte).


type: t
user: sebres
brief: Closed ticket [76f47e0376fb8b27|76f47e0376].
comment:
  Closed ticket [76f47e0376fb8b27|76f47e0376]: <i>thread::send -async script varname aborts with &quot;alloc: invalid block&quot;</i> plus 7 other changes


type: t
user: pooryorick
brief: Ticket [76f47e0376fb8b27|76f47e0376]: 5 changes
comment:
  Ticket [76f47e0376fb8b27|76f47e0376] <i>thread::send -async script varname aborts with &quot;alloc: invalid block&quot;</i> status still Closed with 5 other changes


type: t
user: adrianmedranocalvo
brief: New ticket [b5709ea9060d17f5|b5709ea906].
comment:
  New ticket [b5709ea9060d17f5|b5709ea906] <i>[::thread::send -async] posting order not respected when sending to current thread</i>.


type: t
user: sebres
brief: Ticket [b5709ea9060d17f5|b5709ea906]: 3 changes
comment:
  Ticket [b5709ea9060d17f5|b5709ea906] <i>[::thread::send -async] posting order not respected when sending to current thread</i> status still Open with 3 other changes


type: t
user: adrianmedranocalvo
brief: Ticket [b5709ea9060d17f5|b5709ea906]: 4 changes
comment:
  Ticket [b5709ea9060d17f5|b5709ea906] <i>[::thread::send -async] posting order not respected when sending to current thread</i> status still Open with 4 other changes


type: ci
user: jan.nijtmans
comment:
  Don't use STRLEN_TYPE et al any more, it's superseded by TIP #494. Also eliminate a ton of unnecessary type casts


type: ci
user: jan.nijtmans
comment:
  Eliminate use of Tcl_UniChar type, so Thread compilation doesn't depend on value of TCL_UTF_MAX any more.


type: ci
user: sebres
comment:
  amend to [fe731813cd]: use Tcl_GetUnicodeFromObj (instead of Tcl_GetCharLength) for object-conversion in order to find string-type;
  There are really tcl-versions (or forks;) where Tcl_GetCharLength would not necessarily convert object to unicode.


type: ci
user: jan.nijtmans
comment:
  Further amend to [fe731813cd]: When using Tcl from the utf-max-6 branch (TIP upcoming), compiled with TCL_UTF_MAX>3, then use The Utf-32 version of Tcl_GetUnicodeFromObj() in stead of the Utf-16 version, switchable at run-time.


type: ci
user: jan.nijtmans
comment:
  Tcl_StringMatch ->  Tcl_StringCaseMatch, since  Tcl_StringMatch is actually a wrapper around Tcl_StringCaseMatch


type: t
user: elfring
brief: New ticket [e7bcc945210ae351|e7bcc94521].
comment:
  New ticket [e7bcc945210ae351|e7bcc94521] <i>Support change notifications for thread shared variables</i>.


type: t
user: elfring
brief: New ticket [f5a5c23f47bef3d7|f5a5c23f47].
comment:
  New ticket [f5a5c23f47bef3d7|f5a5c23f47] <i>Clarify execution order for thread creation scripts</i>.


type: t
user: sebres
brief: Ticket [90de9ddf94ecfb6b|90de9ddf94]: 3 changes
comment:
  Ticket [90de9ddf94ecfb6b|90de9ddf94] <i>Checking data consistency for unlocking of mutexes</i> status still Open with 3 other changes


type: t
user: sebres
brief: Ticket [f5a5c23f47bef3d7|f5a5c23f47]: 3 changes
comment:
  Ticket [f5a5c23f47bef3d7|f5a5c23f47] <i>Clarify execution order for thread creation scripts</i> status still Open with 3 other changes


type: t
user: sebres
brief: Closed ticket [90de9ddf94ecfb6b|90de9ddf94].
comment:
  Closed ticket [90de9ddf94ecfb6b|90de9ddf94]: <i>Checking data consistency for unlocking of mutexes</i> plus 6 other changes


type: t
user: sebres
comment:
  Add attachment [/artifact/7ac3bb868d20e1e1|threads - small tpool test.tcl] to ticket [90de9ddf94ecfb6b|90de9ddf94]


type: t
user: elfring
brief: Open ticket [90de9ddf94ecfb6b|90de9ddf94].
comment:
  Open ticket [90de9ddf94ecfb6b|90de9ddf94]: <i>Checking data consistency for unlocking of mutexes</i> plus 5 other changes


type: t
user: sebres
brief: Closed ticket [90de9ddf94ecfb6b|90de9ddf94].
comment:
  Closed ticket [90de9ddf94ecfb6b|90de9ddf94]: <i>Checking data consistency for unlocking of mutexes</i> plus 5 other changes


type: t
user: sebres
comment:
  Add attachment [/artifact/32b06371c85f847b|threads - small tpool test.mod-org.tcl] to ticket [90de9ddf94ecfb6b|90de9ddf94]


type: t
user: elfring
brief: Ticket [90de9ddf94ecfb6b|90de9ddf94]: 5 changes
comment:
  Ticket [90de9ddf94ecfb6b|90de9ddf94] <i>Checking data consistency for unlocking of mutexes</i> status still Closed with 5 other changes


type: t
user: elfring
brief: Ticket [e7bcc945210ae351|e7bcc94521]: 3 changes
comment:
  Ticket [e7bcc945210ae351|e7bcc94521] <i>Support change notifications for thread shared variables</i> status still Open with 3 other changes


type: t
user: sebres
brief: Closed ticket [f5a5c23f47bef3d7|f5a5c23f47].
comment:
  Closed ticket [f5a5c23f47bef3d7|f5a5c23f47]: <i>Clarify execution order for thread creation scripts</i> plus 6 other changes


type: t
user: elfring
brief: Ticket [f5a5c23f47bef3d7|f5a5c23f47]: 5 changes
comment:
  Ticket [f5a5c23f47bef3d7|f5a5c23f47] <i>Clarify execution order for thread creation scripts</i> status still Closed with 5 other changes


type: t
user: anonymous
brief: Ticket [4b9dc05e4ecc9fda|4b9dc05e4e]: 3 changes
comment:
  Ticket [4b9dc05e4ecc9fda|4b9dc05e4e] <i>documentaion of thread::send command</i> status still Open with 3 other changes


type: ci
user: jan.nijtmans
comment:
  Use Tcl's built-in Tcl_GetIntForIndex() function (TIP #544) in stead of Thread's own built-in SvGetIntForIndex(). 
  When running on Tcl <= 8.6, use TclGetIntForIndex() in stead (runtime switched)


type: ci
user: sebres
comment:
  closes [b5709ea906]: thread::send - short circuit sending to itself should consider order of already dispatched events,
  and such events are expected definitely before any IDLE event, only the event synchronously sends to head of queue is expected as first to be processed;
  added test illustrating and covering the issue.


type: t
user: sebres
brief: Closed ticket [b5709ea9060d17f5|b5709ea906].
comment:
  Closed ticket [b5709ea9060d17f5|b5709ea906]: <i>[::thread::send -async] posting order not respected when sending to current thread</i> plus 5 other changes


type: t
user: adrianmedranocalvo
brief: Open ticket [b5709ea9060d17f5|b5709ea906].
comment:
  Open ticket [b5709ea9060d17f5|b5709ea906]: <i>[::thread::send -async] posting order not respected when sending to current thread</i> plus 5 other changes


type: t
user: sebres
brief: Closed ticket [b5709ea9060d17f5|b5709ea906].
comment:
  Closed ticket [b5709ea9060d17f5|b5709ea906]: <i>[::thread::send -async] posting order not respected when sending to current thread</i> plus 6 other changes


type: t
user: sebres
brief: Ticket [b5709ea9060d17f5|b5709ea906]: 4 changes
comment:
  Ticket [b5709ea9060d17f5|b5709ea906] <i>[::thread::send -async] posting order not respected when sending to current thread</i> status still Closed with 4 other changes


# ticket

tkt_uuid: d2df28c065755b0ad144b9519550bb7f4a0a73aa
type: Bug
status: Closed
resolution: Invalid
subsystem: - New Builtin Commands
priority: 1 Zero
severity: Critical
foundin: 2afed999e3
private_contact: 2f102b33d8f807336292e56ff47c6c59de4876c0
title: repo missing two files
assignee: aku
closer: gahr
closedate: 2457533.13287516
comment:
  It appears the repo is missing two files that were present in older (2.6.5, 2008(?)) Sourceforge repos. This will cause ./configure to bail.

  files in question:

  * tclconfig/tcl.m4

  * tclconfig/install-sh

  I copied these files into place on my own system, and ./configure and build did run to completion.


tkt_uuid: 1050490fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: invalid ref in ThreadSetResult
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-10-20T08:54:28
comment:
  ThreadSetResult gets a pointer
  to the string rep of an interp result:

      result = Tcl_GetStringResult(interp);

  then keeps on using that pointer after
  the interp's doing other things, making
  no effort to preserve the result.

  Recent changes on the Tcl HEAD allow
  that result to change out from under us.

  Here's a simple patch to correct.
  Without it, you will see tests fail.


tkt_uuid: 1860425fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.5.0
title: core dump on FreeBSD, thread::create
cmimetype: text/plain
submitter: juliannoble
assignee: msofer
closer: msofer
closedate: 2008-01-11T10:55:12
comment:
  cvs checkout from 2007-12-22
  thread enabled build.
  FreeBSD 6.2

  %package require Thread
  2.6.5
  %thread::create {}
  tclsh in free(): error: junk pointer, too high to make sense



  This problem doesn't occur on 8.5a7 or 8.5b3 built the same way.


tkt_uuid: 405443ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Works For Me
subsystem: 80. Thread Package
priority: 8
foundin: obsolete: 8.4a2
title: thread::send does not return
cmimetype: text/plain
submitter: nobody
assignee: davygrvy
closer: davygrvy
closedate: 2001-04-28T03:05:05
comment:
  After building tcl8.4a2 and thread2.1 on Windows 98, 
  Visual C++ V6 thread::send seems broken.  

  SYNOPSIS:
     package require Thread
     set child [thread::create]
     thread::send $child {set i 0}  #never returns

  I am under the impression that this command should
  return with a value of zero.  But control never comes
  back to the main thread.  The -async option works 
  correctly but I would like the results of child thread 
  commands.

  This worked under tcl8.3.2/thread2.1

  jim


tkt_uuid: 2777803fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Invalid
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: memory leak in ttrace
cmimetype: text/plain
submitter: melbardis
assignee: vasiljevic
closer: ferrieux
closedate: 2009-05-04T21:33:48
comment:
  there appears to be a memory leak when sourcing ttrace.tcl.

  namespace eval ttrace {
          ...
          variable mutex thread::mutex
          variable elock [$mutex create]
  ...}


  the mutex elock is never released when the thread & interpreter are recycled (i am using websh).

  i added a specific mutex destroy comand in the ttrace::cleanup procedure which solved the leak. but i don't think this is correct..

  i am using the latest thread from the cvs repository, with changes to replace Tcl_Alloc with ckalloc...


tkt_uuid: 659131ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 6
foundin: None
title: development targets: Complete pthreads?
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: vasiljevic
closedate: 2003-08-24T15:42:47
comment:
  I want to continue our communication 
  (https://sourceforge.net/tracker/?group_id=10894&atid=360894&func=detail&aid=577014) 
  because the "Thread package 
  2.5" is available. The package has 
  been improved in severall ways.

  1. It seems that some things 
  that are offered by the pthreads library can still be done in the 
  future.
  - add missing lock types 
  (http://www.humanfactor.com/pthreads/pthread-code-
  snippets.html)

  2. more "convenience" functions for thread 
  shared variables
  "string", "regexp" or "keyed list" from the TclX 
  extension for example

  3. Will a thread that was not preserved 
  ("thread::create" without option "-preserved") exit 
  immediately?

  4. A sub function "names" is available for some 
  commands. I think that it would be needed for "thread::mutex" and 
  "thread::cond", too.

  5. When will it be possible to query the 
  mutexes and condition variables by which threads they are 
  used?

  6. The description for "thread::vwait" is missing. 
  (http://cvs.sourceforge.net/cgi-
  bin/viewcvs.cgi/*checkout*/tcl/thread/doc/html/thread.html)

  7. 
  The function "tsv::lock" is available. How do you think about a similar 
  function "thread::lock"?


tkt_uuid: 745976ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Thread Extension missing 2.5.2 CVS tag
cmimetype: text/plain
submitter: apiskors
assignee: vasiljevic
closer: vasiljevic
closedate: 2003-08-23T08:03:24
comment:
  The Tcl Thread Extension version 2.5.2 tarball was
  released 2003-04-29, but there appears to be no tag for
  2.5.2 in CVS.  Very bad.  Please fix.


tkt_uuid: 1716587fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Works For Me
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Thread tests can't run (bad args from makefile)
cmimetype: text/plain
submitter: twylite
assignee: vasiljevic
closer: twylite
closedate: 2012-07-27T09:25:14
comment:
  (A) makefile.vc was updated to the 8.5 build system (ChangeLog 2007/05/03); it calls the test scripts in a new manner (using a -loadfile argument).  tests/all.tcl has not been updated to support this, and as a result the 
  Thread26.dll is never loaded, and the tests cannot run.

  (B) tests/thread.test references tcl_PatchLevel which causes an exception.  Should be tcl_patchLevel

  Patch for these problems and bug [1716582] (Build broken for OPTS=symbols,unchecked) is attached.

  Note: the patch partially reverts the calling of tests\all.tcl in the Makefile.  If you don't do this (and use the -loadfile argument that is has been changed to) then as far as I know you will not be able to build the Threads extension against Tcl 8.4.  That would be a Bad Thing (TM).

  Notes:
  (1) I haven't confirmed that the Thread extension DOES build against 8.4 with this patch (or without it)

  (2) The upgrade referred to in (A) should have fixed [1643367] (Thread extension cannot compile with VC8), but I haven't tested that either.


tkt_uuid: 2511408fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: mutex test errors
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: ferrieux
closedate: 2009-05-04T00:18:08
comment:
  Four tests raising errors in the HEAD
  of the Thread package:

  ==== thread-19.10 thread::mutex - destroy locked exclusive mutex FAILED
  ==== Contents of test case:

      set emutex [thread::mutex create]
      thread::mutex lock $emutex
      set x [catch {thread::mutex destroy $emutex} msg]
      thread::mutex unlock $emutex
      thread::mutex destroy $emutex
      list $x $msg

  ---- Test generated error; Return code was: 1
  ---- Return code should have been one of: 0 2
  ---- errorInfo: no such mutex "mid6"
      while executing
  "thread::mutex unlock $emutex"
      ("uplevel" body line 5)
      invoked from within
  "uplevel 1 $script"
  ---- errorCode: NONE
  ==== thread-19.10 FAILED



  ==== thread-19.11 thread::mutex - destroy locked recursive mutex FAILED
  ==== Contents of test case:

      set rmutex [thread::mutex create -recursive]
      thread::mutex lock $rmutex
      set x [catch {thread::mutex destroy $rmutex} msg]
      thread::mutex unlock $rmutex
      thread::mutex destroy $rmutex
      list $x $msg

  ---- Test generated error; Return code was: 1
  ---- Return code should have been one of: 0 2
  ---- errorInfo: no such mutex "rid7"
      while executing
  "thread::mutex unlock $rmutex"
      ("uplevel" body line 5)
      invoked from within
  "uplevel 1 $script"
  ---- errorCode: NONE
  ==== thread-19.11 FAILED



  ==== thread-20.6 thread::mutex - destroy readlocked mutex FAILED
  ==== Contents of test case:

      set rwmutex [thread::rwmutex create]
      thread::rwmutex rlock $rwmutex
      set x [catch {thread::rwmutex destroy $rwmutex} msg]
      thread::rwmutex unlock $rwmutex
      thread::rwmutex destroy $rwmutex
      list $x $msg

  ---- Test generated error; Return code was: 1
  ---- Return code should have been one of: 0 2
  ---- errorInfo: no such mutex "wid10"
      while executing
  "thread::rwmutex unlock $rwmutex"
      ("uplevel" body line 5)
      invoked from within
  "uplevel 1 $script"
  ---- errorCode: NONE
  ==== thread-20.6 FAILED



  ==== thread-20.7 thread::mutex - destroy writelocked mutex FAILED
  ==== Contents of test case:

      set rwmutex [thread::rwmutex create]
      thread::rwmutex wlock $rwmutex
      set x [catch {thread::rwmutex destroy $rwmutex} msg]
      thread::rwmutex unlock $rwmutex
      thread::rwmutex destroy $rwmutex
      list $x $msg

  ---- Test generated error; Return code was: 1
  ---- Return code should have been one of: 0 2
  ---- errorInfo: no such mutex "wid11"
      while executing
  "thread::rwmutex unlock $rwmutex"
      ("uplevel" body line 5)
      invoked from within
  "uplevel 1 $script"
  ---- errorCode: NONE
  ==== thread-20.7 FAILED


tkt_uuid: 3534440fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.11
title: tpool::wait does not return pending jobs
cmimetype: text/plain
submitter: tomkiti
assignee: vasiljevic
closer: vasiljevic
closedate: 2012-09-13T11:29:07
comment:
  If the optional ?varname? is supplied to tpool::wait, it returns an empty string even if there are jobs pending.


tkt_uuid: 219320ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.3b1
title: Tcl_Finalize doesn't clean-up running threads
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-07-20T11:15:27
comment:
  OriginalBugID: 3904 Bug
  Version: 8.3b1
  SubmitDate: '1999-12-20'
  LastModified: '2000-04-25'
  Severity: SER
  Status: UnAssn
  Submitter: techsupp
  ChangedBy: hobbs
  RelatedBugIDs: 3877
  OS: Windows 2000
  OSVersion: build 2128
  FixedDate: '2000-10-25'
  ClosedDate: '2000-10-25'


  Name:
  David Gravereaux

  CVS:
  I updated today

  CustomShell:
  tclAsync.c fixes in progress

  ReproducibleScript:
  D:\Projects\TclCVS\MainTclTrunk\win\Debug\>tcltest.exe
  % testthread create {
    load "d:/projects/ghe_cvs/ghe/ghe_dirwatch/debug/ghe_dirwatch.dll"
    GHE::startwatch c:/temp {gotcha [testthread id]}
    proc gotcha {id} {
      puts "c:/temp has been written to and yielded notifier thread $id"
    }
    testthread wait
  }
  1344
  % exit

  ObservedBehavior:
  The exit handler I made in the extension's Init with 
  Tcl_CreateThreadExitHandler wasn't called.


tkt_uuid: 1712723fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.5a7
title: joinable threads die on Solaris 64-bit
cmimetype: text/plain
submitter: lvirden
assignee: vasiljevic
closer: hobbs
closedate: 2007-05-29T23:36:06
comment:
  Platform: sparc solaris 9
  Compiler: Forte Developer 7 C 5.4 2002/03/09
  Tcl: cvs head located on tcl.activestate.com ftp site - titled tcl-20070503.tar.gz
  Thread: cvs head located on tcl.activestate.com ftp site - titled thread-20070503.tar.gz
  Configuration parms (for both tcl and thread): \"'--prefix=/projects/sprs_lwv/tcl85' '--enable-shared' '--enable-symbols' '--enable-stubs' '--enable-64bit' '--enable-threads'

  After successfully running a fresh configure/build/test/install of the may 3 tcl, I proceeded to build a fresh copy of the may 3 thread. The configure and build worked fine, then I encountered:
  Tests began at Fri May 04 08:52:33 EDT 2007
  Thread 2.6.5
  Mainthread id is tid1
  thread.test
  gmake: *** [test] Bus Error (core dumped)
   $ dbx /vol/tclsrcsol/tcl85/tcl/unix/tclsh core
  For information about new features see `help changes'
  To remove this message, put `dbxenv suppress_startup_message 7.0' in your .dbxrc
  Reading tclsh
  core file header read successfully
  Reading ld.so.1
  Reading libtcl8.5.so
  Reading libdl.so.1
  Reading libsocket.so.1
  Reading libnsl.so.1
  Reading libpthread.so.1
  Reading libm.so.1
  Reading libc.so.1
  Reading libmp.so.2
  Reading libc_psr.so.1
  Reading libthread.so.1
  Reading libthread2.6.5.so
  detected a multithreaded program
  t@1 (l@1) terminated by signal BUS (invalid address alignment)
  0xffffffff7dd0b7f4: _thrp_join+0x01ac:  stx     %l2, [%i2]
  Current function is Tcl_JoinThread
    166       result = pthread_join((pthread_t) threadId, (void**) state);
  (dbx 1) print threadId                                                
  threadId = 0x7
  (dbx 2) print state   
  state = 0xffffffff7fff19a4
  (dbx 3) where 
  current thread: t@1
    [1] _thrp_join(0x0, 0x0, 0xffffffff7fff19a4, 0x1, 0xffffffff7fff1808, 0xffffffff7fff1810), at 0xffffffff7dd0b7f4
  =>[2] Tcl_JoinThread(threadId = 0x7, state = 0xffffffff7fff19a4), line 166 in "tclUnixThrd.c"
    [3] ThreadJoin(interp = 0x1000428c0, thrId = 0x7), line 2062 in "threadCmd.c"
    [4] ThreadJoinObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 2, objv = 0xffffffff7fff1f48), line 1172 in "threadCmd.c"
    [5] TclEvalObjvInternal(interp = 0x1000428c0, objc = 2, objv = 0xffffffff7fff1f48, command = 0x1003bc6bc "thread::join $tid]\n    ThreadReap\n    set c\n", length = 17, flags = 0), line 3617 in "tclBasic.c"
    [6] TclEvalEx(interp = 0x1000428c0, script = 0x1003bc6bc "thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 17, flags = 0, line = 4), line 4222 in "tclBasic.c"
    [7] TclSubstTokens(interp = 0x1000428c0, tokenPtr = 0xffffffff7fff2820, count = 1, tokensLeftPtr = (nil), line = 4), line 2099 in "tclParse.c"
    [8] TclEvalEx(interp = 0x1000428c0, script = 0x1003bc670 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144, line = 4), line 4087 in "tclBasic.c"
    [9] Tcl_EvalEx(interp = 0x1000428c0, script = 0x1003bc670 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144), line 3892 in "tclBasic.c"
    [10] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1002075b0, flags = 262144, invoker = (nil), word = 0), line 4592 in "tclBasic.c"
    [11] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1002075b0, flags = 262144), line 4475 in "tclBasic.c"
    [12] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100047008), line 900 in "tclProc.c"
    [13] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x100418760), line 1834 in "tclExecute.c"
    [14] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c8520, invoker = (nil), word = 0), line 996 in "tclExecute.c"
    [15] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100046e78, procNameObj = 0x1003d3030, isLambda = 0, skip = 1, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1535 in "tclProc.c"
    [16] ObjInterpProcEx(clientData = 0x100095690, interp = 0x1000428c0, objc = 3, objv = 0x10040d420, isLambda = 0, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1283 in "tclProc.c"
    [17] TclObjInterpProc(clientData = 0x100095690, interp = 0x1000428c0, objc = 3, objv = 0x10040d420), line 1213 in "tclProc.c"
    [18] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x10040d420, command = 0xffffffff7f1df360 "", length = 0, flags = 262144), line 3617 in "tclBasic.c"
    [19] Tcl_EvalObjv(interp = 0x1000428c0, objc = 3, objv = 0x10040d420, flags = 262144), line 3737 in "tclBasic.c"
    [20] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d1e90, flags = 262144, invoker = (nil), word = 0), line 4563 in "tclBasic.c"
    [21] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d1e90, flags = 262144), line 4475 in "tclBasic.c"
    [22] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100046e70), line 900 in "tclProc.c"
    [23] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1002b9e00), line 1834 in "tclExecute.c"
    [24] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c83a0, invoker = (nil), word = 0), line 996 in "tclExecute.c"
    [25] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100046ca8, procNameObj = 0x1003d27c0, isLambda = 0, skip = 1, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1535 in "tclProc.c"
    [26] ObjInterpProcEx(clientData = 0x10010d160, interp = 0x1000428c0, objc = 3, objv = 0x10040d860, isLambda = 0, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1283 in "tclProc.c"
    [27] TclObjInterpProc(clientData = 0x10010d160, interp = 0x1000428c0, objc = 3, objv = 0x10040d860), line 1213 in "tclProc.c"
    [28] TclEvalObjvInternal(interp = 0x1000428c0, objc = 3, objv = 0x10040d860, command = 0xffffffff7f1df360 "", length = 0, flags = 262144), line 3617 in "tclBasic.c"
    [29] Tcl_EvalObjv(interp = 0x1000428c0, objc = 3, objv = 0x10040d860, flags = 262144), line 3737 in "tclBasic.c"
    [30] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2d60, flags = 262144, invoker = (nil), word = 0), line 4563 in "tclBasic.c"
    [31] Tcl_EvalObjEx(interp = 0x1000428c0, objPtr = 0x1003d2d60, flags = 262144), line 4475 in "tclBasic.c"
    [32] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 1, objv = 0x100046ca0), line 900 in "tclProc.c"
    [33] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x100407ea0), line 1834 in "tclExecute.c"
    [34] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000ca950, invoker = (nil), word = 0), line 996 in "tclExecute.c"
    [35] TclObjInterpProcCore(interp = 0x1000428c0, framePtr = 0x100045990, procNameObj = 0x1003cfdf0, isLambda = 0, skip = 1, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1535 in "tclProc.c"
    [36] ObjInterpProcEx(clientData = 0x100094460, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff8bc8, isLambda = 0, errorProc = 0xffffffff7f18d0e0 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1283 in "tclProc.c"
    [37] TclObjInterpProc(clientData = 0x100094460, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff8bc8), line 1213 in "tclProc.c"
    [38] InvokeImportedCmd(clientData = 0x1001bb190, interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff8bc8), line 1904 in "tclNamesp.c"
    [39] TclEvalObjvInternal(interp = 0x1000428c0, objc = 5, objv = 0xffffffff7fff8bc8, command = 0x1003e8af3 "test thread-4.4 {thread::create - create joinable thread} {\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n} {0}\n\ntest thread-4.5 {thread::create - join detached thread} {\n    ThreadReap\n    set tid [thread::create]\n    thread::send -async $tid {after 1000 ; thread::release}\n    catch {set res [thread::join $tid]} msg\n    ThreadReap\n    lrange $msg 0 2\n} {cannot join thread}\n\ntest thread-5.0 {thread::release} {\n    ThreadReap\n    set ti" ..., length = 185, flags = 0), line 3617 in "tclBasic.c"
    [40] TclEvalEx(interp = 0x1000428c0, script = 0x1003e7fb0 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0, line = 97), line 4222 in "tclBasic.c"
    [41] Tcl_EvalEx(interp = 0x1000428c0, script = 0x1003e7fb0 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0), line 3892 in "tclBasic.c"
    [42] Tcl_FSEvalFileEx(interp = 0x1000428c0, pathPtr = 0x1003cf190, encodingName = (nil)), line 1818 in "tclIOUtil.c"
    [43] Tcl_SourceObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 2, objv = 0x100045980), line 953 in "tclCmdMZ.c"
    [44] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1003bbe70), line 1834 in "tclExecute.c"
    [45] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1000c9f30, invoker = 0xffffffff7fffbd60, word = 1), line 996 in "tclExecute.c"
    [46] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1000c9f30, flags = 0, invoker = 0xffffffff7fffbd60, word = 1), line 4677 in "tclBasic.c"
    [47] Tcl_CatchObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 3, objv = 0x100045968), line 253 in "tclCmdAH.c"
    [48] TclExecuteByteCode(interp = 0x1000428c0, codePtr = 0x1003c1420), line 1834 in "tclExecute.c"
    [49] TclCompEvalObj(interp = 0x1000428c0, objPtr = 0x1003cf7f0, invoker = 0xffffffff7fffc5a0, word = 3), line 996 in "tclExecute.c"
    [50] TclEvalObjEx(interp = 0x1000428c0, objPtr = 0x1003cf7f0, flags = 0, invoker = 0xffffffff7fffc5a0, word = 3), line 4677 in "tclBasic.c"
    [51] Tcl_ForeachObjCmd(dummy = (nil), interp = 0x1000428c0, objc = 4, objv = 0xffffffff7fffc6e8), line 1811 in "tclCmdAH.c"
    [52] TclEvalObjvInternal(interp = 0x1000428c0, objc = 4, objv = 0xffffffff7fffc6e8, command = 0x100063553 "foreach file [lsort [::tcltest::getMatchingFiles]] {\n    set tail [file tail $file]\n    puts stdout $tail\n    if {[catch {source $file} msg]} {\n        puts stdout $msg\n    }\n}\n\n# Cleanup\nputs stdout "\nTests ended at [eval $timeCmd]"\n::tcltest::cleanupTests 1\n\nreturn\n\n", length = 177, flags = 0), line 3617 in "tclBasic.c"
    [53] TclEvalEx(interp = 0x1000428c0, script = 0x100062ed0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0, line = 53), line 4222 in "tclBasic.c"
    [54] Tcl_EvalEx(interp = 0x1000428c0, script = 0x100062ed0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0), line 3892 in "tclBasic.c"
    [55] Tcl_FSEvalFileEx(interp = 0x1000428c0, pathPtr = 0x100032f80, encodingName = (nil)), line 1818 in "tclIOUtil.c"
    [56] Tcl_Main(argc = -1, argv = 0xffffffff7fffd1a8, appInitProc = 0x100001e58 = &Tcl_AppInit(Tcl_Interp *interp)), line 441 in "tclMain.c"
    [57] main(argc = 2, argv = 0xffffffff7fffd198), line 87 in "tclAppInit.c"
  (dbx 4) 


tkt_uuid: 933975ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: tpool::create -minworkers
cmimetype: text/plain
submitter: mooooooo
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-11-27T06:14:18
comment:
  When using larger values for -minworkers tpool::create
  never returns and Ctrl-C is required.  On my platform,
  it seems to not like more than 12 worker threads. 
  Setting -maxworkers fixes it with some larger values
  but not others.

  Minimal sample code:

    package require Thread 2.6
    set ::threads [tpool::create -minworkers 16 -idletime
  120]
    puts "id $::threads"

  Both Tcl and Threads 2.6 were pulled from CVS
  lastnight, but I noticed the same problem with 2.5. 
  tpool.tcl works as expected.

  Fully updated Redhat/Fedora Core 1, dual Athlon 2100, 1
  gig of system memory.


tkt_uuid: 3056785fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: update to TEA 3.9 and Thread 2.6.7 release
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: dgp
closedate: 2011-08-19T20:34:38
comment:
  Attached is patch making changes to configure.in

  Apply and run autoconf to get the HEAD ready
  to produce Thread 2.6.7.


tkt_uuid: 3493120fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 7 High
severity: Minor
foundin: obsolete: 8.5.11
title: Thread extension, memory leak after thread exit
cmimetype: text/plain
submitter: sebres
assignee: sebres
closer: sebres
closedate: 2457190.9749667
comment:
  Version: 8.5.11 (original and current core-8-5-branch)
  Platform: Windows (linux not yet tested)

  After exiting of threads, they leave a memory leak. 
  Consequence of that: we cannot use techniques such as 'idletime' (to release some system resources, for example large tcl codes are no more used, etc, etc.).

  After run of following script I have lost 100MB of memory. In fact, nothing will be done here, except threads are created and exited.

  Test script:

  # for test purposes - to wait for threads exited :
  tsv::set testth count 0
  # this create once a thread pool, and generate jobs :
  proc test {} {
    # create a thread pool if not yet already exists :
    if {![llength [tpool::names]]} {
      tpool::create -minworkers 0 -maxworkers 5 -idletime 1 -initcmd {
        # + 1 thread
        tsv::set testth count [expr {[tsv::get testth count] + 1}]; puts [thread::id]init!!!!!
      } -exitcmd {
        # - 1 thread
        tsv::set testth count [expr {[tsv::get testth count] - 1}]; puts [thread::id]!!!!!exit
      }
    }
   # generate jobs until 5 threads are created :
    while {[tsv::get testth count] < 5} {
      tpool::post -detached -nowait [lindex [tpool::names] 0] {
        puts [thread::id]!!job; tsv::array unset testthcount [thread::id]
      }
      update
    }
  }
  # repeat test 100 times, in addition waiting for the 
  # threads to be finished each iteration :
  time {test; while {[tsv::get testth count]} {after 10};} 100


tkt_uuid: 1634129fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Works For Me
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a5
title: bus error during gmake test
cmimetype: text/plain
submitter: lvirden
assignee: vasiljevic
closer: sf-robot
closedate: 2007-02-23T03:20:09
comment:
  tcl and thread configured with 
  ../configure --prefix=/projects/sprs_lwv/tcl85 \--enable-shared --enable-symbols --enable-threads \
          --enable-64bit

  on sparc solaris 9 using sun c compiler.
  Here's the result of the gmake test:

  Tcl 8.5a6 tests running in interp:  /vol/tclsrcsol/tcl85/tcl/unix/tclsh
  Tests running in working dir:  /vol/tclsrcsol/tcl85/thread/tests
  Only running tests that match:  *
  Skipping test files that match:  l.*.test
  Only sourcing test files that match:  *.test
  Tests began at Fri Jan 12 10:22:43 EST 2007
  Thread 2.6.5
  Mainthread id is tid1
  thread.test
  gmake: *** [test] Bus Error (core dumped)
  and here's the dbx output:

  Reading tclsh8.5
  core file header read successfully
  Reading ld.so.1
  Reading libtcl8.5.so
  Reading libdl.so.1
  Reading libsocket.so.1
  Reading libnsl.so.1
  Reading libpthread.so.1
  Reading libm.so.1
  Reading libc.so.1
  Reading libmp.so.2
  Reading libc_psr.so.1
  Reading libthread.so.1
  Reading libthread2.6.5.so
  detected a multithreaded program
  t@1 (l@1) terminated by signal BUS (invalid address alignment)
  0xffffffff7dd0b83c: _thrp_join+0x01ac:  stx     %l2, [%i2]
  Current function is Tcl_JoinThread
    166       result = pthread_join((pthread_t) threadId, (void**) state);
  (dbx 1) where
  current thread: t@1
    [1] _thrp_join(0x0, 0x0, 0xffffffff7fff0e54, 0x1, 0xffffffff7fff0cb8, 0xffffffff7fff0cc0), at 0xffffffff7dd0b83c
  =>[2] Tcl_JoinThread(threadId = 0x7, state = 0xffffffff7fff0e54), line 166 in "tclUnixThrd.c"
    [3] ThreadJoin(interp = 0x1000428b0, thrId = 0x7), line 2062 in "threadCmd.c"
    [4] ThreadJoinObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 2, objv = 0xffffffff7fff13f8), line 1172 in "threadCmd.c"
    [5] TclEvalObjvInternal(interp = 0x1000428b0, objc = 2, objv = 0xffffffff7fff13f8, command = 0x1003f800c "thread::join $tid]\n    ThreadReap\n    set c\n", length = 17, flags = 0), line 3659 in "tclBasic.c"
    [6] TclEvalEx(interp = 0x1000428b0, script = 0x1003f800c "thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 17, flags = 0, line = 4), line 4263 in "tclBasic.c"
    [7] TclSubstTokens(interp = 0x1000428b0, tokenPtr = 0xffffffff7fff1cd0, count = 1, tokensLeftPtr = (nil), line = 4), line 2098 in "tclParse.c"
    [8] TclEvalEx(interp = 0x1000428b0, script = 0x1003f7fc0 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144, line = 4), line 4128 in "tclBasic.c"
    [9] Tcl_EvalEx(interp = 0x1000428b0, script = 0x1003f7fc0 "\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n", numBytes = 120, flags = 262144), line 3934 in "tclBasic.c"
    [10] TclEvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cb5f0, flags = 262144, invoker = (nil), word = 0), line 4652 in "tclBasic.c"
    [11] Tcl_EvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cb5f0, flags = 262144), line 4516 in "tclBasic.c"
    [12] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 1, objv = 0x100046ed8), line 889 in "tclProc.c"
    [13] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x100046ec8, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
    [14] TclExecuteByteCode(interp = 0x1000428b0, codePtr = 0x1004046d0), line 1832 in "tclExecute.c"
    [15] TclCompEvalObj(interp = 0x1000428b0, objPtr = 0x1000c8d50, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
    [16] TclObjInterpProcCore(interp = 0x1000428b0, framePtr = 0x100046d48, procNameObj = 0x1003ce860, isLambda = 0, skip = 1, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
    [17] ObjInterpProcEx(clientData = 0x100178790, interp = 0x1000428b0, objc = 3, objv = 0x1003f9d90, isLambda = 0, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
    [18] TclObjInterpProc(clientData = 0x100178790, interp = 0x1000428b0, objc = 3, objv = 0x1003f9d90), line 1196 in "tclProc.c"
    [19] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x1003f9d90, command = 0xffffffff7f2fd7a0 "", length = 0, flags = 262144), line 3659 in "tclBasic.c"
    [20] Tcl_EvalObjv(interp = 0x1000428b0, objc = 3, objv = 0x1003f9d90, flags = 262144), line 3779 in "tclBasic.c"
    [21] TclEvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cebc0, flags = 262144, invoker = (nil), word = 0), line 4609 in "tclBasic.c"
    [22] Tcl_EvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cebc0, flags = 262144), line 4516 in "tclBasic.c"
    [23] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 1, objv = 0x100046d40), line 889 in "tclProc.c"
    [24] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x100046d30, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
    [25] TclExecuteByteCode(interp = 0x1000428b0, codePtr = 0x1002b7bf0), line 1832 in "tclExecute.c"
    [26] TclCompEvalObj(interp = 0x1000428b0, objPtr = 0x1000ca940, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
    [27] TclObjInterpProcCore(interp = 0x1000428b0, framePtr = 0x100046b78, procNameObj = 0x1003cee00, isLambda = 0, skip = 1, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
    [28] ObjInterpProcEx(clientData = 0x10016c900, interp = 0x1000428b0, objc = 3, objv = 0x1003f9690, isLambda = 0, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
    [29] TclObjInterpProc(clientData = 0x10016c900, interp = 0x1000428b0, objc = 3, objv = 0x1003f9690), line 1196 in "tclProc.c"
    [30] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x1003f9690, command = 0xffffffff7f2fd7a0 "", length = 0, flags = 262144), line 3659 in "tclBasic.c"
    [31] Tcl_EvalObjv(interp = 0x1000428b0, objc = 3, objv = 0x1003f9690, flags = 262144), line 3779 in "tclBasic.c"
    [32] TclEvalObjEx(interp = 0x1000428b0, objPtr = 0x1003ce470, flags = 262144, invoker = (nil), word = 0), line 4609 in "tclBasic.c"
    [33] Tcl_EvalObjEx(interp = 0x1000428b0, objPtr = 0x1003ce470, flags = 262144), line 4516 in "tclBasic.c"
    [34] Tcl_UplevelObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 1, objv = 0x100046b70), line 889 in "tclProc.c"
    [35] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x100046b60, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
    [36] TclExecuteByteCode(interp = 0x1000428b0, codePtr = 0x1003ffd20), line 1832 in "tclExecute.c"
    [37] TclCompEvalObj(interp = 0x1000428b0, objPtr = 0x1000ca880, invoker = (nil), word = 0), line 1014 in "tclExecute.c"
    [38] TclObjInterpProcCore(interp = 0x1000428b0, framePtr = 0x100045920, procNameObj = 0x1003cba10, isLambda = 0, skip = 1, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1501 in "tclProc.c"
    [39] ObjInterpProcEx(clientData = 0x100178210, interp = 0x1000428b0, objc = 5, objv = 0xffffffff7fff8588, isLambda = 0, errorProc = 0xffffffff7f17d0a8 = &`libtcl8.5.so`tclProc.c`MakeProcError(Tcl_Interp *interp, Tcl_Obj *procNameObj)), line 1254 in "tclProc.c"
    [40] TclObjInterpProc(clientData = 0x100178210, interp = 0x1000428b0, objc = 5, objv = 0xffffffff7fff8588), line 1196 in "tclProc.c"
    [41] InvokeImportedCmd(clientData = 0x1001aac80, interp = 0x1000428b0, objc = 5, objv = 0xffffffff7fff8588), line 1892 in "tclNamesp.c"
    [42] TclEvalObjvInternal(interp = 0x1000428b0, objc = 5, objv = 0xffffffff7fff8588, command = 0x1003e88d3 "test thread-4.4 {thread::create - create joinable thread} {\n    ThreadReap\n    set tid [thread::create -joinable {set x 5}]\n    set c [thread::join $tid]\n    ThreadReap\n    set c\n} {0}\n\ntest thread-4.5 {thread::create - join detached thread} {\n    ThreadReap\n    set tid [thread::create]\n    thread::send -async $tid {after 1000 ; thread::release}\n    catch {set res [thread::join $tid]} msg\n    ThreadReap\n    lrange $msg 0 2\n} {cannot join thread}\n\ntest thread-5.0 {thread::release} {\n    ThreadReap\n    set ti" ..., length = 185, flags = 0), line 3659 in "tclBasic.c"
    [43] TclEvalEx(interp = 0x1000428b0, script = 0x1003e7d90 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0, line = 97), line 4263 in "tclBasic.c"
    [44] Tcl_EvalEx(interp = 0x1000428b0, script = 0x1003e7d90 "# Commands covered:  thread\n#\n# This file contains a collection of tests for one or more of the Tcl\n# built-in commands.  Sourcing this file into Tcl runs the tests and\n# generates output for errors.  No output means no errors were found.\n#\n# Copyright (c) 1996 Sun Microsystems, Inc.\n# Copyright (c) 1998-2000 Scriptics Corporation.\n# Copyright (c) 2002 ActiveState Corporation.\n#\n# See the file "license.terms" for information on usage and redistribution\n# of this file, and for a DISCLAIMER OF ALL WARRANTIES." ..., numBytes = 33216, flags = 0), line 3934 in "tclBasic.c"
    [45] Tcl_FSEvalFileEx(interp = 0x1000428b0, pathPtr = 0x1003caed0, encodingName = (nil)), line 1812 in "tclIOUtil.c"
    [46] Tcl_SourceObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 2, objv = 0x100045910), line 959 in "tclCmdMZ.c"
    [47] TclEvalObjvInternal(interp = 0x1000428b0, objc = 2, objv = 0x100045910, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
    [48] TclExecuteByteCode(interp = 0x1000428b0, codePtr = 0x1003a7e20), line 1832 in "tclExecute.c"
    [49] TclCompEvalObj(interp = 0x1000428b0, objPtr = 0x1003cb3b0, invoker = 0xffffffff7fffba40, word = 1), line 1014 in "tclExecute.c"
    [50] TclEvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cb3b0, flags = 0, invoker = 0xffffffff7fffba40, word = 1), line 4737 in "tclBasic.c"
    [51] Tcl_CatchObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 3, objv = 0x1000458f8), line 249 in "tclCmdAH.c"
    [52] TclEvalObjvInternal(interp = 0x1000428b0, objc = 3, objv = 0x1000458f8, command = (nil), length = 0, flags = 0), line 3659 in "tclBasic.c"
    [53] TclExecuteByteCode(interp = 0x1000428b0, codePtr = 0x1003dce80), line 1832 in "tclExecute.c"
    [54] TclCompEvalObj(interp = 0x1000428b0, objPtr = 0x1003cb500, invoker = 0xffffffff7fffc370, word = 3), line 1014 in "tclExecute.c"
    [55] TclEvalObjEx(interp = 0x1000428b0, objPtr = 0x1003cb500, flags = 0, invoker = 0xffffffff7fffc370, word = 3), line 4737 in "tclBasic.c"
    [56] Tcl_ForeachObjCmd(dummy = (nil), interp = 0x1000428b0, objc = 4, objv = 0xffffffff7fffc4b8), line 1828 in "tclCmdAH.c"
    [57] TclEvalObjvInternal(interp = 0x1000428b0, objc = 4, objv = 0xffffffff7fffc4b8, command = 0x100063d43 "foreach file [lsort [::tcltest::getMatchingFiles]] {\n    set tail [file tail $file]\n    puts stdout $tail\n    if {[catch {source $file} msg]} {\n        puts stdout $msg\n    }\n}\n\n# Cleanup\nputs stdout "\nTests ended at [eval $timeCmd]"\n::tcltest::cleanupTests 1\n\nreturn\n\n", length = 177, flags = 0), line 3659 in "tclBasic.c"
    [58] TclEvalEx(interp = 0x1000428b0, script = 0x1000636c0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0, line = 53), line 4263 in "tclBasic.c"
    [59] Tcl_EvalEx(interp = 0x1000428b0, script = 0x1000636c0 "# all.tcl --\n#\n# This file contains a top-level script to run all of the Tcl\n# tests.  Execute it by invoking "source all.test" when running tcltest\n# in this directory.\n#\n# Copyright (c) 1998-1999 by Scriptics Corporation.\n# All rights reserved.\n# \n# RCS: @(#) $Id: all.tcl,v 1.5 2004/12/18 13:26:03 vasiljevic Exp $\n\npackage require tcltest\nnamespace import -force ::tcltest::*\n\nset ::tcltest::testSingleFile false\nset ::tcltest::testsDirectory [file dir [info script]]\n\n# We need to ensure that the testsDirec" ..., numBytes = 1937, flags = 0), line 3934 in "tclBasic.c"
    [60] Tcl_FSEvalFileEx(interp = 0x1000428b0, pathPtr = 0x1000332d0, encodingName = (nil)), line 1812 in "tclIOUtil.c"
    [61] Tcl_Main(argc = -1, argv = 0xffffffff7fffcf78, appInitProc = 0x100001e50 = &Tcl_AppInit(Tcl_Interp *interp)), line 441 in "tclMain.c"
    [62] main(argc = 2, argv = 0xffffffff7fffcf68), line 87 in "tclAppInit.c"
  (dbx 2) 


tkt_uuid: 406058ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Bug in thread library
cmimetype: text/plain
submitter: villalba
assignee: davygrvy
closer: davygrvy
closedate: 2001-05-27T03:22:40
comment:
  working with Thread-2.1 under Windows-NT I found the  
  following bug. While executing

      for {set i 0} {$i < 1000} {incr i} { 
  set T [thread::create] 
  catch "thread::send $T thread::exit"
      }

  you can see in Task manager (of windows) that the  
  number of handles* grows up.

  * under processes in task manager choose columns in  
  View menu and mark number of handles.

  Greetings,
  Villalba


tkt_uuid: 1965721fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 8
foundin: obsolete: 8.5.2
title: memory corruption in thread pool ?
cmimetype: text/plain
submitter: rudenstam
assignee: vasiljevic
closer: rudenstam
closedate: 2008-05-28T13:21:48
comment:
  I have written a tclscript that uses the packages listed below. After between a few hours and up to a week (approximately) it crashes with "alloc: invalid block" error. I compiled tcl and packages with symbols, trace follows below.

  In mainthread I am using:
  tcl: 8.5.2
  Thread: 2.6.5
  tls: 1.6
  udp: 1.0.9

  In threadpool threads I am using:
  tcl: 8.5.2
  Thread: 2.6.5
  mysqltcl: 3.05

  TpoolWorker() is trying to Tcl_Free() a (TpoolResult *rPtr) that 
  (a) when cast as a (char *) contains "replacedThisPrivateInfo 26 360969"
  (b) is different from the clientData it received
  (c) is not recognised as having been Tcl_Alloc'ed
  This hints at mem corruption?

  (gdb) bt 40
  #0  0xb7f70410 in ?? ()
  #1  0xad79c19c in ?? ()
  #2  0x00000006 in ?? ()
  #3  0x00003117 in ?? ()
  #4  0xb7cfd811 in raise () from /lib/tls/i686/cmov/libc.so.6
  #5  0xb7cfefb9 in abort () from /lib/tls/i686/cmov/libc.so.6
  #6  0xb7f0d4d6 in Tcl_PanicVA (format=0xb7f60fc4 "alloc: invalid block: %p: %x %x", argList=0xad79c384 "\033\226í·¸Ãy­Y¢ò·\bø\212\t") at /root/tcl8.5.2/unix/../generic/tclPanic.c:103
  #7  0xb7f0d506 in Tcl_Panic (format=0xb7f60fc4 "alloc: invalid block: %p: %x %x") at /root/tcl8.5.2/unix/../generic/tclPanic.c:132
  #8  0xb7f2ab35 in Ptr2Block (ptr=0x98af808 "replacedThisPrivateInfo 26 360969") at /root/tcl8.5.2/unix/../generic/tclThreadAlloc.c:735
  #9  0xb7f2a259 in TclpFree (ptr=0x98af808 "replacedThisPrivateInfo 26 360969") at /root/tcl8.5.2/unix/../generic/tclThreadAlloc.c:376
  #10 0xb7e7499d in Tcl_Free (ptr=0x98af808 "replacedThisPrivateInfo 26 360969") at /root/tcl8.5.2/unix/../generic/tclCkalloc.c:1182
  #11 0xb736e8cb in TpoolWorker (clientData=0xbfb7c31c) at ../generic/threadPoolCmd.c:1108
  #12 0xb7ec13cb in NewThreadProc (clientData=0x8223d80) at /root/tcl8.5.2/unix/../generic/tclEvent.c:1386
  #13 0xb7e30240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
  #14 0xb7da049e in clone () from /lib/tls/i686/cmov/libc.so.6

  The "replacedThisPrivateInfo" is private information that I've stripped out, it's a 41 characters long word.

  The string is read from a tls channel inside a fileevent. From there it's passed to a proc using this command: 
  catch {$command $sock $id [lrange $data 2 end]} error

  the proc looks like this:
  proc SIZES { sock id line } {
  if { [llength [split [join $line]]] == 3 } {
  foreach { dir files bytes } [split [join $line]] { }
  tpool::post -nowait $::pool "SIZES $sock $dir $files $bytes"
  log SIZES $dir $files $bytes ($::sockets($sock,user))
  } else {
  puts $sock [list $id SIZES usage [list {SIZES <dir> <files> <bytes>}]]
  }
  }

  In the threadpool the exact string is never found.

  The string is found again when the threadpool returns to the mainthread, where it sends it over a normal tcl (non tls) socket.

  The threadpool is started with the following command:
  set ::pool [tpool::create -minworkers $min -maxworkers $max -initcmd "source workers.tcl" -exitcmd {catch {mysql::close $::sql}}]

  Where both $min and $max is set to 20 so thread should only be created when script starts (had problems with threads not being created when needed).

  I'm afraid that I've been unable to make small simple script that has these results, the server also lasted much longer when it was in testing phase with just 10 or so clients on it, now it has about 120-150 concurrent clients.

  I use tpool::wait in a non standard way. In my process that read results, I wait for future job ids. I issue the tpool::wait command with a list of any incompleted jobs + future job ids up to 50 in total.


tkt_uuid: 672050ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: function interface design and namespaces
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
comment:
  The programming interface for the thread package consists of 
  several functions that are grouped into a few namespaces. A lot of 
  functions have got a parameter/argument that specifies a 
  subcommand at the first position.

  How do you think about the 
  following suggestion?
  I would like to try an interface design like 
  that:
  Examples...
  1. thread::mutex lock 
      instead of
      
  thread::mutex::lock 

  2. thread::cond::create
      instead 
  of
      thread::cond create

  3. tsv::array::names
      instead 
  of
      tsv::array names

  Does the increased use of 
  namespace functions make a valuable difference in speed and 
  maintenance?
  Is it a step nearer to an object oriented TCL class 
  library for thread programming?


tkt_uuid: 3006957fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Script access to Tcl_CancelEval
cmimetype: text/plain
submitter: kjnash
assignee: vasiljevic
closer: vasiljevic
closedate: 2012-09-13T09:18:37
comment:
  It would be useful to have a command

      thread::cancel ?-unwind? thread_id ?interp_path?

  that translates to the TIP #285 function implemented in Tcl 8.6

      int Tcl_CancelEval(Tcl_Interp *interp, ClientData clientData, int flags)

  and goes beyond "interp cancel" by allowing a script to cancel an interpreter in another thread.


tkt_uuid: 1449383fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: Memory leak in Thread
cmimetype: text/plain
submitter: dharan
assignee: vasiljevic
closer: vasiljevic
closedate: 2006-03-14T21:00:35
comment:
  Hi,
         I have found a memory leak problem while using 
  the TCL thread package. The Tcl version is 8.4.13 and 
  Thread version is 2.6.2. I have also attached a sample 
  script to support my findings. The sample script 
  creates & releases 5 threads for 14 times . For each 
  time , the memory of the tclsh process increases by 
  700 kb(avg). I have traced the memory through Windows 
  Task Manager. 

  please forgive me if I had done anything wrong.

  OS version : windows 2000

  Thanks in Advance.

  Gangadharan.


tkt_uuid: 577014ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Remind
subsystem: 80. Thread Package
priority: 3 Low
foundin: None
title: documentation; wait on thread exits
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-08-09T17:14:02
comment:
  1. When will the documentation for the "Thread package 
  2.2" be available?
  2. When will it be possible to wait for the end of several 
  threads like the shell command "wait" does it for 
  background processes? (See "man wait")


tkt_uuid: 2005794fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.19
title: tpool::create freezes when using minworkers
cmimetype: text/plain
submitter: rudenstam
assignee: vasiljevic
closer: vasiljevic
closedate: 2008-10-22T08:23:32
comment:
  When trying to use -minworkers when creating a threadpool, the tcl script just freezes up when the pool is to be created. This behaviour is irregular and the following code has been tested working on several platforms. On my previous linux installation, it worked 6/10 times, either it froze where indicated now, or it created the pool without trouble. That installation was a debian etch running tcl 8.4.

  The one I have this problem 10/10 times now, is a debian lenny. I got both tcl8.4.19 and tcl8.5.2 installed on it, and I get the exact same behaviour with both tcl versions. Thread was built from CVS to include the recent fix that closed bug 1965721.

  I'd be happy add any other information you might need and to try out any potential fix, as this probably will work on your end.

  Cheers
  rudenstam

  -----------------------------------------
   Code used to test this
  -----------------------------------------
  puts "Using tcl version: [info patchlevel]"
  puts "Loading threads version: [package require Thread]"

  set min 5
  puts "Creating the threadpool with: set pool \[tpool::create -minworkers $min\]"

  set pool [tpool::create -minworkers $min]

  puts "pool $pool created"

  -----------------------------------------
   Output of tclsh thread.tcl
  -----------------------------------------
  Using tcl version: 8.4.19
  Loading threads version: 2.6.5
  Creating the threadpool with: set pool [tpool::create -minworkers 5]

  -----------------------------------------
   Output of strace tclsh thread.tcl
  -----------------------------------------
  write(1, "Creating the threadpool with: se"..., 70Creating the threadpool with: set pool [tpool::create -minworkers 5]
  ) = 70
  mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6b22000
  mprotect(0xb6b22000, 4096, PROT_NONE)   = 0
  clone(child_stack=0xb73224c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb7322bd8, {entry_number:6, base_addr:0xb7322b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb7322bd8) = 14613
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a118, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a11c, 0x80 /* FUTEX_??? */, 1) = -1 EAGAIN (Resource temporarily unavailable)
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 0
  mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6321000
  mprotect(0xb6321000, 4096, PROT_NONE)   = 0
  clone(child_stack=0xb6b214c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb6b21bd8, {entry_number:6, base_addr:0xb6b21b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb6b21bd8) = 14614
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a118, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a11c, 0x80 /* FUTEX_??? */, 4) = -1 EAGAIN (Resource temporarily unavailable)
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 0
  mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb5b20000
  mprotect(0xb5b20000, 4096, PROT_NONE)   = 0
  clone(child_stack=0xb63204c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb6320bd8, {entry_number:6, base_addr:0xb6320b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb6320bd8) = 14615
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a118, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a11c, 0x80 /* FUTEX_??? */, 9) = -1 EAGAIN (Resource temporarily unavailable)
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 0
  mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb531f000
  mprotect(0xb531f000, 4096, PROT_NONE)   = 0
  clone(child_stack=0xb5b1f4c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb5b1fbd8, {entry_number:6, base_addr:0xb5b1fb90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb5b1fbd8) = 14616
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a118, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a11c, 0x80 /* FUTEX_??? */, 16) = -1 EAGAIN (Resource temporarily unavailable)
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb4b1e000
  mprotect(0xb4b1e000, 4096, PROT_NONE)   = 0
  clone(child_stack=0xb531e4c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb531ebd8, {entry_number:6, base_addr:0xb531eb90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb531ebd8) = 14617
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a118, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x809a11c, 0x80 /* FUTEX_??? */, 25) = -1 EAGAIN (Resource temporarily unavailable)
  futex(0x804c4c0, 0x81 /* FUTEX_??? */, 1) = 1
  write(1, "pool tpool0x8063ed0 created\r\n", 29pool tpool0x8063ed0 created
  ) = 29
  futex(0x809a11c, 0x84 /* FUTEX_??? */, 1) = 4
  futex(0x809b598, 0x81 /* FUTEX_??? */, 1) = 1
  futex(0x8088e64, 0x80 /* FUTEX_??? */, 1


tkt_uuid: 994229ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.6
title: tsv::lock doesn't lock between threads
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-11-25T16:07:16
comment:
  A [tsv::lock <arrayName>] will not prevent two threads 
  from accessing the tsv array.

  % puts $tcl_version
  8.4
  % array get tcl_platform
  osVersion 7.3.0 byteOrder bigEndian threaded 1 machine 
  {Power Macintosh} platform unix os Darwin user ts
  anders wordSize 4
  % package require Thread
  2.5

  Testcase:

  package require Thread

  tsv::set global true 1
  tsv::set global false 0

  set a [thread::create]
  set b [thread::create]
  set ::finish 0

  thread::send $a [list set x [thread::id]]; # main thread 
  id
  thread::send -async $a {
      set ::finish 0
      puts "a: [thread::id]"
      tsv::lock global {
          puts "a: has global lock ([tsv::get global true])"
          tsv::set global true 2
          vwait ::finish
      }
      puts "a: released global lock"
      thread::send $::x {incr ::finish}
  }

  # kick thread a out of lock
  after 5000 {thread::send $a {incr ::finish}}

  after 1000 {
      thread::send -async $b {
          puts "b: [thread::id], waiting for global lock"
          tsv::lock global { puts "b: got global lock 
  ([tsv::get global true])" }
          puts "b: released global lock"
      }
  }

  vwait ::finish


  Output:

  a: 25173504
  a: has global lock (1)
  b: 25174528, waiting for global lock
  b: got global lock (2)
  b: released global lock
  a: released global lock


  You can see that b was able to obtain the lock and 
  access the tsv global array data while thread 'a' had the 
  lock.

  I saw one message in the forum about this also but the 
  person never got an answer there.   Any clues?  I 
  peeked at the code and didn't see an immediate problem 
  but I'm not familiar with that code at all.

  sanders012<at>earth.com


tkt_uuid: 884549ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 7 High
foundin: final: 8.3.5
title: Segmentation fault returning value in Thread for Thread 2.5
cmimetype: text/plain
submitter: wobster
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-01-31T14:26:13
comment:
  I wrote a simple "exec" function that runs the
  specified program in another thread, splits out the
  stdout and
  stderr output and returns asynchronously.
  (I attached the script and traceback from the core dump
  at the end of this message.)

  I started off using Tcl 8.3.5/Thread 2.5 (2.1.5). It
  seems that if the  script running in the
  other thread returns a value using "return $result", I
  get a core dump. But, if I return the
  value using "set result", it doesn't core dump.

  If I use Tcl 8.4.5/Thread 2.5.2, the script throws an
  error condition if I use
  "return $result", but not if I use "set result". It
  should not be throwing
  an error condition. (It doesn't matter whether the
  print.tcl prints to
  stderr, it happens when only stdout  is printed as well.)

  Thanks,

  Rob



  test.tcl
  #!/bin/csh -f

  # comment out next line \
  exec tclsh8.3 $9 $argv:q
  #exec tclsh8.4 $9 $argv:q

  package require Thread

  namespace eval DE {

         proc threadError { threadid errorInfo } {
                 global DE::threadError
                 set threadError 1
                 return $threadError
         }

         proc texec { args } {
                 global DE::thread DE::threadError
  errorInfo errorCode
                 global result

                 set DE::threadError 0

                 set thread [thread::create]
                 thread::errorproc DE::threadError

                 set script {
                         set result ""
                         set filename tmp_[pid]

                         set errorCheck 0
                         set errorCheck [ catch { eval
  exec $program 2> $filename } result ]

                         set lines ""
                         if { $errorCheck > 0 } {
                                 set FILE [open $filename r]
                                 set lines [read $FILE 
  [file size $filename]]
                                 close $FILE
                                 file delete $filename
                                 error "$lines"
                         } else {
                                 file delete $filename
                                 #set output
                         }
                         set result [list $result $lines
  $errorCheck]

                         #set result; # this works
                         return $result ; # this doesn't
                 }

                 thread::send -async $thread "set program
  \"$args\"; $script" result

                 vwait result

                 if { $DE::threadError != 0 } {
                         error "Error executing command
  $args:\n$result\n$errorInfo"
                 }

                 if { [string length [lindex $result 1]]
  != 0 } {
                         puts stderr [lindex $result 1]
                 }

                 return [lindex $result 0]
         }

  }

  if { 1 } {
         catch {
                  puts [DE::texec ./print.tcl]
         } output
         puts "$output"
  }

  --------------------  file print.tcl
  -----------------------------------------------------

  #!/bin/csh

  # comment \
  exec tclsh $9 $*

  puts stdout "message from stdout"
  puts stderr "message from stderr"
  #error "throw an error"

  -------------------------------------- Traceback
  -----------------------------------

  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show
  warranty" for details.
  This GDB was configured as "i386-redhat-linux"...
  Core was generated by `tclsh8.3 test.tcl'.
  Program terminated with signal 11, Segmentation fault.
  Reading symbols from
  /fltapps/opt/mdopt/3dopt/Linux-2/lib/libtcl8.3g.so...done.
  Loaded symbols for
  /fltapps/opt/mdopt/3dopt/Linux-2/lib/libtcl8.3g.so
  Reading symbols from /lib/libdl.so.2...done.
  Loaded symbols for /lib/libdl.so.2
  Reading symbols from /lib/libpthread.so.0...done.
  Loaded symbols for /lib/libpthread.so.0
  Reading symbols from /lib/libm.so.6...done.
  Loaded symbols for /lib/libm.so.6
  Reading symbols from /lib/libc.so.6...done.
  Loaded symbols for /lib/libc.so.6
  Reading symbols from /lib/ld-linux.so.2...done.
  Loaded symbols for /lib/ld-linux.so.2
  Reading symbols from
  /fltapps/opt/mdopt/3dopt/Linux-2/lib/thread2.5/libthread2.5g.so...done.
  Loaded symbols for
  /fltapps/opt/mdopt/3dopt/Linux-2/lib/thread2.5/libthread2.5g.so
  #0  0x40184e27 in strlen () from /lib/libc.so.6
  (gdb) where
  #0  0x40184e27 in strlen () from /lib/libc.so.6
  #1  0x4008ed9d in Tcl_NewStringObj (bytes=0x726f7272
  <Address 0x726f7272 out of bounds>, length=-1)
     at ../generic/tclStringObj.c:167
  #2  0x4009638d in Tcl_SetVar2 (interp=0x804cd50,
  part1=0x400cea27 "errorCode", part2=0x0,
     newValue=0x726f7272 <Address 0x726f7272 out of
  bounds>, flags=1) at ../generic/tclVar.c:1079
  #3  0x40096362 in Tcl_SetVar (interp=0x804cd50,
  varName=0x400cea27 "errorCode",
     newValue=0x726f7272 <Address 0x726f7272 out of
  bounds>, flags=1) at ../generic/tclVar.c:1026
  #4  0x400c39d2 in ThreadClbkSetVar (interp=0x804cd50,
  clientData=0x807d4b8) at generic/threadCmd.c:1379
  #5  0x400c5889 in ThreadEventProc (evPtr=0x80831a8,
  mask=-3) at generic/threadCmd.c:2626
  #6  0x4007eb62 in Tcl_ServiceEvent (flags=-3) at
  ../generic/tclNotify.c:607
  #7  0x4007ee52 in Tcl_DoOneEvent (flags=-3) at
  ../generic/tclNotify.c:846
  #8  0x400590db in Tcl_VwaitObjCmd (clientData=0x0,
  interp=0x804cd50, objc=2, objv=0x804f268)
     at ../generic/tclEvent.c:990
  #9  0x40059e7f in TclExecuteByteCode (interp=0x804cd50,
  codePtr=0x8073b68) at ../generic/tclExecute.c:877
  #10 0x40036cb7 in Tcl_EvalObjEx (interp=0x804cd50,
  objPtr=0x8071ce8, flags=0) at ../generic/tclBasic.c:2733
  #11 0x4008ab2e in TclObjInterpProc
  (clientData=0x8073e40, interp=0x804cd50, objc=2,
  objv=0x804f260)
     at ../generic/tclProc.c:1001
  #12 0x40059e7f in TclExecuteByteCode (interp=0x804cd50,
  codePtr=0x8073538) at ../generic/tclExecute.c:877
  #13 0x40036cb7 in Tcl_EvalObjEx (interp=0x804cd50,
  objPtr=0x80696e0, flags=0) at ../generic/tclBasic.c:2733
  #14 0x4003b74b in Tcl_CatchObjCmd (dummy=0x0,
  interp=0x804cd50, objc=3, objv=0x804f250)
     at ../generic/tclCmdAH.c:264
  #15 0x40059e7f in TclExecuteByteCode (interp=0x804cd50,
  codePtr=0x8073438) at ../generic/tclExecute.c:877
  #16 0x40036cb7 in Tcl_EvalObjEx (interp=0x804cd50,
  objPtr=0x8071e38, flags=0) at ../generic/tclBasic.c:2733
  #17 0x4003f20a in Tcl_IfObjCmd (dummy=0x0,
  interp=0x804cd50, objc=3, objv=0xbfffe770)
     at ../generic/tclCmdIL.c:240
  #18 0x4008189b in EvalObjv (interp=0x804cd50, objc=3,
  objv=0xbfffe770,
     command=0x805e030 "\nif { 1 } {\n\tcatch {\n\t\t
  puts [DE::texec ./print.tcl]\n\t} output\n\tputs
  \"$output\"\n}\n", length=81, flags=0) at
  ../generic/tclParse.c:932
  #19 0x40082162 in Tcl_EvalEx (interp=0x804cd50,
     script=0x805db38 "#!/bin/tcsh -f\n\n# comment out
  next line \\\nexec tclsh8.3 $9 $argv:q\n#exec tclsh8.4
  $9 $argv:q\n\npackage require Thread\n\nnamespace eval
  DE {\n\n\tproc threadError { threadid errorInfo }
  {\n\t\tglobal DE::threa"..., numBytes=1353, flags=0) at
  ../generic/tclParse.c:1393
  #20 0x40076206 in Tcl_EvalFile (interp=0x804cd50,
  fileName=0xbfffec1c "test.tcl")
     at ../generic/tclIOUtil.c:323
  #21 0x40079d81 in Tcl_Main (argc=1, argv=0xbfffede8,
  appInitProc=0x80486b6 <Tcl_AppInit>)
     at ../generic/tclMain.c:227
  #22 0x080486ac in main (argc=2, argv=0xbfffede4) at
  ../unix/tclAppInit.c:99
  #23 0x401221c4 in __libc_start_main () from /lib/libc.so.6
  (gdb)


tkt_uuid: 3532972fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 8.6.3
title: Tcl Scripts results in "called Tcl_FindHashEntry on deleted"
cmimetype: text/plain
submitter: arius-marius
assignee: dgp
closer: gahr
closedate: 2457527.27686613
comment:
  Tcl Version: 8.5.11
  OS Platform and Version: Windows 7 (64 bit) & Linux (32 bit)
  Thread Package: 2.6.6 (Linux) & 2.6.7 (Windows)

  Problem Behavior:
  - If script execution has finished the following output appears: called Tcl_FindHashEntry on deleted
  - Additionally, under Linux a core dump is created

  Expected Behavior:
  - A clean finalization of Tcl interpreter

  Tcl-Script:

  package require Thread

  set th1 [thread::create {puts worker_running ; thread::wait ; puts worker_stopped}]

  thread::send -async $th1 {puts script_started; after 5000; puts script_done} go

  puts "waiting for go..."

  vwait go

  if { [thread::exists $th1] } { 
      thread::release $th1
      puts worker_released
  }

  puts main_done


tkt_uuid: 1021078fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 8
foundin: obsolete: 8.4.7
title: thread::transfer cause exception (TIP #218)
cmimetype: text/plain
submitter: nobody
assignee: andreas_kupries
closer: andreas_kupries
closedate: 2005-10-05T20:20:32
comment:
  running this script on windows xp Home
  tcl 8.4.7 threaded 
  thread version 2.6

  when trying to read from a socket after it was 
  transfered to the thread using "thread::transfer" I get 
  exception. the same happens with "thread::attach" 
  and "thread::detach"

  here is the script:

  package require Thread

  proc acceptRequest {sock ip port} {
  after idle [list handleRequest $sock $ip $port 
  [thread::id]]
  }

  proc handleRequest {sock ip port mainThreadId} {
  puts "$sock $ip $port"
  global threadId
  #thread::detach $sock
  thread::transfer $threadId $sock
  thread::send $threadId [list doSock $sock]
  }
  set threadId [thread::create]
  thread::send $threadId {
  proc doSock {sock}  {
  #thread::attach $sock
  puts [gets $sock 1]
  close $sock
  }
  }
  set sock [socket -server acceptRequest 7790]
  vwait foreve


tkt_uuid: 3382401fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 7 High
severity: Minor
foundin: None
title: Thread pool leaks memory
cmimetype: text/plain
submitter: auriocus
assignee: vasiljevic
closer: sebres
closedate: 2457190.99466275
comment:
  Using thread pool to do a computation in parallel with many thousand tasks, I noticed, that tpool leaks memory. The script attached demonstrates the loss both in ActiveTcl 8.5.10.1 on Windows/64 and in tcl8.6 HEAD on Mac OSX. My real computation ran for several hours on 6 cores and the leaked memory summed up to several hundred MB. I could not locate the leakage any further, first I thought the culprit was the tpool::wait command with the list result, but replacing it with a simple "after" in the test case has no influence. Also, tpool::release can not free the leaked memory.


tkt_uuid: 560387ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.3
title: Package version incorrect
cmimetype: text/plain
submitter: mgbacke
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-05-30T12:33:49
comment:
  The Thread 2.2 version reports version 2.1.1 when
  loaded. Among other things, this makes it impossible to
  confirm the correct Thread version (via package provide
  Thread).

  I believe the configure.in needs changing.


tkt_uuid: 439581ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Works For Me
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.3.3
title: crash when application terminates
cmimetype: text/plain
submitter: fringe
assignee: andreas_kupries
closer: andreas_kupries
closedate: 2001-09-28T20:23:55
comment:
  Name: 
    Sangho Park

  Extensions: 
    Thread 2.1

  CustomShell: 

  Comments: 
    tcl 8.3.3 compiled on CC with threads enabled. 
  Solaris 2.5.1

  ObservedBehavior: 
    Below I include a thread script which causes a crash 
  when application terminate.  It crash 1~2 out of 20 
  executions. Error message is various : "Segment 
  Fault", "Tcl_Release couldn't find reference for 
  0xedfb8" "Bus Error". 

  ReproducibleScript: 

  -------- run.csh ------
  #!/bin/csh
  while ( 1 )
     main_thread.tcl
  end

  ---- main_thread.tcl ----
  #!/usr/local/bin/tclsh
  package require Thread

  set total_done 10
  set current 0

  proc returnProc {thread_result} {
  global total_done current
  incr current -1
  }

  for { set i 0 } { $i < $total_done} { incr i } {
      while { $current == 4 } {
  after 10 ; update
      }

      set childid1 [thread::create {source 
  child_thread.tcl; thread::wait}]
      incr current
      thread::send $childid1 "set b 100"
      thread::send -async $childid1 "run_child 
  [thread::id]"

  }

  while { [llength [thread::names]] > 1 } {
      after 10 ; update
  }

  ---- child_thread.tcl ----
  proc run_child { main_id } {
      thread::send $main_id "returnProc [thread::id]"
      thread::exit
  }


  DesiredBehavior: 
    It should not happen !!


tkt_uuid: 3129844fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 8
foundin: obsolete: 8.5.9
title: Thread hangs on specific exit sequence
cmimetype: text/plain
submitter: tombert
assignee: vasiljevic
closer: andreas_kupries
closedate: 2010-12-08T22:39:06
comment:
  Running the following commands crashes tcl 8.5.9 in openSuse linux, windows XP/W7 doesn't crash.
  TCL compiled with MinGW/MinSYS.

  > package re Thread
  2.6.7
  > thread::names
  tid0xb71de8d0
  > thread::release [thread::id]
  > thread::names
  > update
  > exit


tkt_uuid: 1745928fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: obsolete: 8.4.14
title: thread's memory isn't being released
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: sebres
closedate: 2457190.9981381
comment:
  when using thread::create, the memory allocated isn't free after the thread ends.
  code:
  -----------------------------
  Microsoft Windows XP [Version 5.1.2600]
  (C) Copyright 1985-2001 Microsoft Corp.

  C:\Documents and Settings\navidor>tclsh84
  % package require Thread
  2.6.5
  % set t [thread::create {puts "a"}]; puts "$t"
  tid00000A38
  % a

  % thread::names
  tid0000012C
  %
  -------------------------------------------
  I'm using winXP, tcl 8.4.14.0
  proccess memory (from windows task manager):
  before requiring Thread package: 2,808k
  after     "          "         : 2,940k
  after creating a thread (and after it ends): 3,716k
  after few minutes of waiting: 84k

  Is it familiar to anyone? any ideas?


tkt_uuid: 1934666fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Works For Me
subsystem: 80. Thread Package
priority: 7 High
foundin: obsolete: 8.5.1
title: Core dump when using 'clock format ...' in a thread
cmimetype: text/plain
submitter: s_euler
assignee: vasiljevic
closer: hobbs
closedate: 2008-11-03T23:54:36
comment:
  OS = HP-UX 11 :
  I get a core dump when using any form of 'clock format ...'.

  Linux :
  I lost my KDE 'control bar' when running the script.


tkt_uuid: 3407860fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: None
title: thread::exit flaws
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: dgp
closedate: 2457540.10588153
comment:
  Perhaps there's no value fixing a command that's
  marked deprecated, but...

  [thread::exit] is documented to take no arguments,
  but that's not checked.  Any number of arguments
  are accepted and ignored without error.

  It would seem to be more valuable, both in utility
  and in parallel behavior with [::exit] for the command
  [thread::exit] to accept one optional argument, an
  integer "exit code" for the thread.

  Without such an argument [thread::exit] always
  declares the thread exit code to be 666, and
  [thread::join] returns that value as documented,
  when it is used.  But what value is that?  Returning
  a value that never changes?


tkt_uuid: 2979665fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: TEA version -> 3.7
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: dkf
closedate: 2010-03-31T14:18:07
comment:
  Thread's configure.in has

  TEA_INIT([3.6])

  asking for version 3.6 of TEA utilities.

  Current version of TEA is 3.7, and that's
  what a checkout of Thread delivers, leading
  to configure warnings.  Ought to reconcile this
  before releasing 2.6.6


tkt_uuid: 762398ffffffffffffffffffffffffffffffffff
type: Patch
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: support thread priority (Windows only)
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
comment:
  I patched the threadCmd.c (of thread 2.5.2 package) so 
  you can change the thread priority in windows 
  environments.

  Everything that is modified is enclosed in an #ifdef 
  _USE_THREADPRIO/endif compiler statement.

  I don't know wether unix supports thread priorities.
  Thread priorities are 
  "normal", "above", "below", "high", "low", "idle", "unknown" 

  where unknown indicates an error.

  ***
  thread::configure ThreadId -priority 

  returns one of the above names. If none of them does 
  fit (should not happen) the int value is returned.

  If the thread doesn't have priority an empty string is 
  returned.

  ***
  thread::configure ThreadId -priority NewThreadPriority

  changes the thread priority
  Note: at the moment no error is returned on a failure

  ***
  maybe someone decides to integrate this in standard 
  thread library.

  Have fun with it!

  Harald


tkt_uuid: 3543020fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.6b3
title: Thread extension not building with makefile. when in release
cmimetype: text/plain
submitter: decosterjos
assignee: nijtmans
closer: nijtmans
closedate: 2012-07-18T06:52:32
comment:
  The Threads package has a makefile.vc to build with Visual Studio in directory win/vc. When adding the Thread package to the pkgs directory for a 'batteries included' Tcl release, the makefile.vc file is moved from directory win/vc to directory win. This invalidates the ROOT variable used in the makefile.vc. It still has value ..\.. where after copying it should become ..


tkt_uuid: 3534581fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.11
title: tpool::post -nowait still waits
cmimetype: text/plain
submitter: tomkiti
assignee: vasiljevic
closer: vasiljevic
closedate: 2012-09-13T11:23:00
comment:
  The -nowait option to tpool::post appears to not work. It is supposed to post a job to the job queue immediately and return, however it seems to wait for a thread to become idle before returning.


tkt_uuid: 3534442fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.11
title: tpool::create -idletime documentation incorrect
cmimetype: text/plain
submitter: tomkiti
assignee: vasiljevic
closer: vasiljevic
closedate: 2012-09-13T11:28:00
comment:
  The documentation for the -idletime option for tpool::create is incorrect. The last sentence, "Default value for this option is unspecified, hence, the Tcl interpreter of the worker thread will contain just the initial set of Tcl commands" is copied from the -initcmd option. The default value for -idletime is not specified.


tkt_uuid: 1988779fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.2
title: Tcl_SetStringObj called with shared object
cmimetype: text/plain
submitter: cnassau
assignee: vasiljevic
closer: hobbs
closedate: 2008-11-03T23:47:51
comment:
  We're occasionally seeing panics with Thread.2.6.5 and Tcl.8.5.2:

     Tcl_SetStringObj called with shared object

  A typical stack trace is

  IOT/Abort trap in pthread_kill at 0xd005aaf4 ($t8)
  0xd005aaf4 (pthread_kill+0xa8) 80410014        lwz   r2,0x14(r1)
  (dbx) where
  pthread_kill(??, ??) at 0xd005aaf4
  _p_raise(??) at 0xd005a100
  raise.raise(??) at 0xd01e367c
  abort.abort() at 0xd01f2280
  Tcl_PanicVA() at 0xd4f14c78
  Tcl_Panic() at 0xd4f14cf4
  Tcl_SetStringObj() at 0xd4f3293c
  ThreadSend() at 0xd5ded484
  ThreadSendObjCmd() at 0xd5dea548
  TclEvalObjvInternal() at 0xd4f4b1c8
  (...)

  The implementation of ThreadSend in file thread2.6.5/generic/threadCmd.c contains the lines

      code = resultPtr->code;
      Tcl_SetStringObj(Tcl_GetObjResult(interp), resultPtr->result, -1);

  which seems suspicious. I see no compelling reason why Tcl_GetObjResult(interp) should be unshared at that point, so a plain

      Tcl_SetResult(interp, resultPtr->result, TCL_VOLATILE);

  should be used instead.

  Note: there's also a similar line in SvObjObjCmd in file 
  thread2.6.5/generic/threadSvCmd.c

   


tkt_uuid: 3026061fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: threadCmd.c:Init() references an interp but not preserves it
cmimetype: text/plain
submitter: a_kovalenko
assignee: vasiljevic
closer: sf-robot
closedate: 2010-10-12T19:20:04
comment:
  This bug is a member of "rare segfaults on exit" family. However I've found a way to reproduce it reliably:

  #!/usr/bin/wish8.6
  # The _wish_ interpreter is mandatory for reproducing the bug using this script: 
  # the example below depends on Tk_MainEx() being called.
  package req Thread
  package req Tk
  # Create thread pool
  set tph [tpool::create]
  # Post a long-running job
  tpool::post -nowait -detached $tph "after 5000; 
    [list thread::send -async [thread::id] {puts "foo bar, yep?"}];"
  # Make Tk/wish exit earlier than the job finishes
  after 3000 {destroy .}
  # And then it segfaults.

  What's going on?
  1. On initial `package require Thread', threadCmd.c:Init() is called for the main interpreter. Interps for other threads are created with threadCmd.c:NewThread(), only the main one is not _created_ but _registered_ with Init(). NewThread() takes care to Tcl_Preserve/Tcl_Release the interp when appropriate, but Init() doesn't. Pointer to the main interp is now stored in tsdPtr, but there is no Tcl_Preserve call to prevent its destruction, nor Tcl_CallWhenDeleted handler to wipe the pointer when the interp is destroyed. BAD.

  2. Thread pool is created and the job is posted, so a worker thread is created and NewThread is started in it. No problem here.

  3. Before the job finishes, main window is destroyed, and Tk_MainEx is going to exit.

  4. Tk_MainEx marks the main interp for deletion, then calls Tcl_Release on it, causing its actual deletion. From looking at Tk_MainEx I decided that it has the right to do what it does - that's why this bug is submitted against Thread package, not Tk. 

  4.1. At this point, tsdPtr of thread package has a dangling reference to a corpse of main interp. BAD.

  5. Then Tk_MainEx calls Tcl_Exit(0), which in turn invokes application exit handlers.

  6. ThreadPoolCmd.c:AppExitHandler() tries to destroy the thread pool gracefully. It causes a worker thread to exit and then waits for it, calling Tcl_DoOneEvent() repeatedly until there is no workers.

  7. But, _before_ the worker thread exits, it posts an event to the main thread, asking it to eval "puts..." within its main interp (that doesn't exist).

  8. threadCmd.c:ThreadEventProc() retrieves a dangling interp pointer from main thread's tsd.

  9. When it comes to Tcl_ResetResult(dead interp), wish segfaults.

  A possible solution, not nessesary the best one, is to add a couple of lines into threadCmd.c:Init():
   Tcl_Preserve(interp);
   Tcl_CreateThreadExitHandler(Tcl_Release, interp);

  Another possible solution is to assign NULL to tsdPtr->interp when interp is deleted (Tcl_CallWhenDeleted).


tkt_uuid: 1523697fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 6
foundin: obsolete: 8.5a5
title: Crash using clock commands in a Thread using VFS
cmimetype: text/plain
submitter: ctasada
assignee: vasiljevic
closer: hobbs
closedate: 2007-02-09T00:11:43
comment:
  Hi guys,

  I'm using Tcl 8.5a4 with Thread 2.6.3 in a housemade
  TclKit with threads enabled (of course) and VFS 1.3
  (including the patch Jeff Hobbs did on 2006-05-26).

  When running the next code with the Tcl/Tk without
  using VFS it runs ok, but when we execute this code in
  a Threaded TclKit it crashes (sorry, but I don't see
  any error message).

  if {[catch {
      package require Thread
  }]} {
      load thread.dll
  }

  set threadIds {}
  set x 0

  while {$x < 10} {
      lappend threadIds [thread::create]
      incr x
  }

  foreach threadId $threadIds {
      thread::send -async $threadId "clock format [clock
  seconds] -format \"%Y/%m/%d %H:%M:%S\""
  }

  To me looks like a VFS/Thread problem or maybe a clock
  problem (I've tested with ActiveState 8.4.13 BaseKit
  and seems to work fine).

  If you need anything else, please don't hesitate to
  contact me.

  Best Regards,
  Carlos Tasada.


tkt_uuid: 918137ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.6
title: pkgIndex.tcl breaks Tcl 7
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-04-02T09:56:45
comment:
  If the Thread package gets installed
  in a directory that happens to be on
  the auto_path of a Tcl 7 interpreter,
  its index script (pkgIndex.tcl) causes
  errors in that interpreter.  This can
  be corrected by a rewrite of Thread's
  pkgIndex.tcl.in file to:

  # Tcl package index file, version 1.1

  if {![package vsatisfies [package provide Tcl] 8.3]}
  {return}
  if {[string equal 8.3 [package provide Tcl]]} {
      package ifneeded Thread @THREAD_VERSION_SUBSET83@ \
              [list load [file join $dir
  @thread_LIB_FILE@] Thread]
  } else {
      package ifneeded Thread @VERSION@ \
              [list load [file join $dir
  @thread_LIB_FILE@] Thread]
  }
  package ifneeded Ttrace @TTRACE_VERSION@ \
          [list source [file join $dir ttrace.tcl]]


  (Patch also attached.)

  See also http://wiki.tcl.tk/5900


tkt_uuid: 486399ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.4a3
title: Panic on exit before all threads returned
cmimetype: text/plain
submitter: chrishall
assignee: vasiljevic
closer: ferrieux
closedate: 2009-06-15T21:52:47
comment:
  Solaris 2.7, 2 CPU machine

  [belinda 14]--> gcc -v
  Reading specs from
  /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3/specs
  gcc version 2.95.3 20010315 (release)

  Tcl 8.4a3, built thus:

  ./configure\
  --enable-threads\
  --enable-shared\
  --enable-gcc\
  --prefix=/opt/tcl8.4a3

  Thread package built thus:

  ./configure\
  --enable-gcc\
  --with-tcl=/opt/tcl8.4a3/lib\
  --enable-shared\
  --enable-threads\
  --prefix=/opt/tcl8.4a3

  The attached tar file contains three small scripts. If
  you run:

  tclsh8.4 boss.tcl

  You should be able to get it to do this:
  [belinda 66]--> tclsh8.4 boss.tcl
  task_done 6
  task_done 7
  task_done 8
  task_done 9
  task_done 10
  task_done 6
  task_done 7
  task_done 8
  task_done 9
  task_done 6
  10 exiting...
  BOSS: worker_exit 10
  8 exiting...
  7 exiting...
  BOSS: worker_exit 8
  BOSS: worker_exit 7
  9 exiting...
  BOSS: worker_exit 9
  6 exiting...
  BOSS: worker_exit 6
  BOSS: done...
  Tcl_Release couldn't find reference for 0x43938
  Abort (core dumped)

  My stack trace is:

  (gdb) where
  #0  0xff059968 in __sigprocmask () from
  /usr/lib/libthread.so.1
  #1  0xff04f1f0 in _resetsig () from
  /usr/lib/libthread.so.1
  #2  0xff04e93c in _sigon () from
  /usr/lib/libthread.so.1
  #3  0xff0517b4 in _thrp_kill () from
  /usr/lib/libthread.so.1
  #4  0xff0b9450 in abort () from /usr/lib/libc.so.1
  #5  0xff2ee028 in Tcl_PanicVA () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #6  0xff2ee054 in Tcl_Panic () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #7  0xff2f57f0 in Tcl_Release () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #8  0xfe7c347c in ThreadEventProc ()
     from /opt/tcl8.4a3/lib/thread2.2/../libthread2.2.so
  #9  0xff2ec1e0 in Tcl_ServiceEvent () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #10 0xff2ec538 in Tcl_DoOneEvent () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #11 0xfe7c3148 in ThreadWait ()
     from /opt/tcl8.4a3/lib/thread2.2/../libthread2.2.so
  #12 0xfe7c1b28 in ThreadWaitObjCmd ()
     from /opt/tcl8.4a3/lib/thread2.2/../libthread2.2.so
  #13 0xff2eebec in EvalObjv () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #14 0xff2ef230 in Tcl_EvalEx () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #15 0xff2e33dc in Tcl_FSEvalFile () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #16 0xff2b51ac in Tcl_SourceObjCmd () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #17 0xff2eebec in EvalObjv () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #18 0xff2ef230 in Tcl_EvalEx () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #19 0xff2ef48c in Tcl_Eval () from
  /opt/tcl8.4a3/lib/libtcl8.4.so
  #20 0xfe7c2238 in NewThread ()
     from /opt/tcl8.4a3/lib/thread2.2/../libthread2.2.so


tkt_uuid: 3381371fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: obsolete: 8.6b1.1
title: possible memory leak?
cmimetype: text/plain
assignee: vasiljevic
closer: sebres
closedate: 2457190.99657662
comment:
  Using the latest ActiveState 8.6 and the Thread package on Ubuntu based distro, 32 bit, kernel 2.6.35-30
  I ran the following script 4 times:

       time {set ::t [thread::create]; thread::release $::t} 10000

  Here are the results from htop, one line for each invocation, first line is a state before the first run. 
  VIRT  RES  SHR
  15268 3296 1824
  32884 4632 1964
  33104 4936 1972
  33328 5160 1972
  33592 5384 1972

  There seems to be 100-300 byte leak for each invocation of the script.


tkt_uuid: 418693ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: thread extension not resposible for this
cmimetype: text/plain
submitter: davygrvy
assignee: davygrvy
closer: davygrvy
closedate: 2001-04-25T23:19:41
comment:
  In the thread extension, ThreadWait inappropriatly 
  runs all events on the event loop directly.  I don't 
  think this is right.  When ThreadWait falls-out, the 
  stack should fall back to NewThread where 
  Tcl_DeleteInterp will happen.  Any *responsible* 
  extension who posts events to the event loop will be 
  notified here that the interp is going away and from 
  there they can remove offending events in the queue 
  before the notifier is torn-down.

  Just my 2 cents...


tkt_uuid: 2050025fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Threads extension fails to install in custom location
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2010-09-28T19:33:25
comment:
  Threads extensions does not install entirely in a custom location by using the configure option.

  Using --prefix= option of configure does not set the exec_prefix line in the makefile (it remains at /usr). This also, of course, results in an error if attempting to make install as a non-root user. Manually editing the makefile fixes this fairly trivially.

  Platform used was Mandriva Linux 2008.1


tkt_uuid: 674367ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: call for a function that is not thread safe
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
comment:
  I describe an use case for the handling of unsafe functions calls with 
  the thread package.

  I must assume that an application 
  programming interface (like a graphics library or a music API) or even 
  a single function is not thread safe if this property is not described in the 
  documentation for that API.
  So I must ensure that all unsafe 
  functions are executed by a single thread at each time. I want to create a 
  thread for each function library that must be handled as it has not 
  implemented thread safety at startup/initialization time of my 
  application. I want to achieve that calls into different unsafe libraries 
  can be executed simultaneously.

  I can perform the call with the 
  function "thread::send" for a thread that has been created before. But I 
  think that I will need a special kind of mutual exclusion. I understand the 
  thread package's documentation in the way that a mutex that is created 
  by the command "thread::mutex create" belongs to the calling thread. 
  It may not be stored in a thread shared variable. Please correct me if I 
  make wrong assumptions here.

  I guess that the function 
  "thread::eval" does not all what I want and need here. It does not expect 
  a thread indentifier in its argument list.
  I need a mutex that is global to 
  the process scope 
  (http://citeseer.nj.nec.com/cs?cs=1&q=synchronization+and+global+and+mutex&submit=Documents&co=Expected+Citations&cm=50&cf=Any&ao=Expected+Citations&am=20&af=Any
  ) 
  to perform a protected and synchronous call of a code piece that 
  should be executed by an other thread.
  I would like to suggest new 
  functions like the following.

  1. thread::mutex::create 
  global
           or
     thread::mutex -global create

  2. 
  thread::safecall id global_mutex script ?varname?


  How 
  do you think about this suggestion?
  Does this use case lead to add 
  more synchronization primitives to the thread package?


tkt_uuid: 1358496fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a3
title: ttrace::eval "wrong # args: should be "proc name args body""
cmimetype: text/plain
submitter: nickpa
assignee: vasiljevic
closer: vasiljevic
closedate: 2005-12-05T18:05:39
comment:
  ttrace::eval does not seem to work properly under 
  Thread 2.6.2. I have tried the same under 2.6.0 and 
  2.6.1, no problem there.

  See the output below:

  nick@ns2986:~/ $ /usr/tcl85/bin/tclsh8.5 
  % package require Thread 2.6.2
  2.6.2
  % ttrace::eval { proc lala {lala} {puts lala}}
  wrong # args: should be "proc name args body"
  % puts $errorInfo
  wrong # args: should be "proc name args body"
      while executing
  "proc lala lala puts lala"
      ("uplevel" body line 1)
      invoked from within
  "::uplevel proc lala {lala} {puts lala}"
      (in namespace eval "::" script line 1)
      invoked from within
  "namespace eval $nmsp ::uplevel $cmd $args"
      invoked from within
  "ttrace::eval { proc lala {lala} {puts lala}}"
  % 


tkt_uuid: 584123ffffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: Patch to fully stub enable Thread packag
cmimetype: text/plain
submitter: mdejong
assignee: vasiljevic
closer: mdejong
closedate: 2002-07-20T18:30:18
comment:
  Here is a patch that gets rids of the only
  undefined symbol in the Thread package.
  This is important since the undefined symbol
  makes it *very* difficult to load the Thread
  package into another executable that has
  also loaded Tcl dynamically.

  I ran into this problem while testing out
  Tcl Blend. The error message I was seeing
  looked like this:

  Exception in thread "main" tcl.lang.TclException:
  couldn't load file
  "/share/tcljava/build/thread/libthread2.4g.so":
  /share/tcljava/build/thread/libthread2.4g.so: undefined
  symbol: tclEmptyStringRep


  After much poking around and reading of man
  pages for dlopen, I found the problem. The
  Thread package must be self contained in
  order to work correctly. The package already
  takes care of this with a little hack for
  Windows. Thing is, this same hack is also
  needed under Linux. My patch makes that
  change. I am also going to include a testing
  program that I created to test shared lib
  loading using dlopen.


tkt_uuid: 2979572fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: compiler warnings threadSpCmd.c
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2010-03-31T08:53:18
comment:
  On the current HEAD:

  gcc -DPACKAGE_NAME=\"thread\" -DPACKAGE_TARNAME=\"thread\" -DPACKAGE_VERSION=\"2.6.5\" -DPACKAGE_STRING=\"thread\ 2.6.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1   -I"/home/dgp/cvs/tcl-only/generic"    -pipe -O2 -fomit-frame-pointer -Wall -fPIC  -c `echo /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c` -o threadSpCmd.o
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c: In function ‘ThreadRWMutexObjCmd’:
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:468: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c: In function ‘SpMutexLock’:
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1129: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1132: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c: In function ‘SpMutexUnlock’:
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1161: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1164: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c: In function ‘SpMutexFinalize’:
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1203: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1206: warning: dereferencing type-punned pointer will break strict-aliasing rules
  /home/dgp/cvs/tcl-only/pkgs/thread2.6.5/generic/threadSpCmd.c:1209: warning: dereferencing type-punned pointer will break strict-aliasing rules



  Would be good to silence these warnings before
  a release of Thread 2.6.6


tkt_uuid: 987512ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a2
title: mem-leak in thread::send -async
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-11-25T16:32:37
comment:
  hi, I hope, this is a bug and is not work as designed :=)

  this testscript confiscated over 9MByte Ram. the
  call thread::send -async send 385 Bytes to the thread and
  after 25000 calls, the thread use ~9300 KByte memory
  (offset) ! after I release the thread, the memory will
  not be freed. if I send the script without -async, all
  memory will be 
  freed.

  I have make the test with the current cvs snap-shot 
  changelog -> R1.2132, Wed Jul 7 22:05:56 2004
  on a linux 2.6.7 i386 & ppc system, with & without
  USE_THREAD_ALLOC in the CFLAG.

  before som days, i have posted a problem in the
  tcl-thread-list, i think, it is the same problem. 

  regards, joerg 

  set ::Thread {
    proc TestProc {args} {
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      set x "xxxxxxxxxxxxxxxxxxxxxxxx"
      return 0
    }
    TestProc
  }

  set thid [thread::create "thread::wait"]
  for {set ni 0} {$ni < 25000} {incr ni} {thread::send
  -async $thid $::Thread}
  thread::send $thid -async "thread::release"

  vwait forever


tkt_uuid: 3382497fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.10
title: configure error in 2-6-branch
cmimetype: text/plain
submitter: tombert
assignee: andreas_kupries
closer: tombert
closedate: 2011-07-29T22:39:03
comment:
  Environment W7, MinGW; The branch 2-6-branch stops with an error in configure:

  checking if 64bit Sparc VIS support is requested... no
  checking if Windows/CE build is requested... no
  checking system version (for dynamic loading)... ./configure: line 10082: syntax error near unexpected token `('
  ./configure: line 10082: `    case `(ac_space=' '; set | grep ac_space) 2>&1` in'

  thx


tkt_uuid: 1603234fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.4.14
title: Memory leak with thread::transfer
cmimetype: text/plain
submitter: nobody
assignee: dgp
closer: dgp
closedate: 2012-04-24T16:41:00
comment:
  I am developing project using Tcl + Thread (BitTorrent tracker). At first I tried to use model where main thread after accepting new connection (using 
  socket -server) transfers connection socket to free thread using thread::transfer. But testing of this model reveals slow memory leak (about 1Mb/5min with requests rate about 100 req/sec). Using Tcl memory debugging (Tcl and Thread built with --enable-symbols=mem) and memory command I found that memory leaks after each thread::transfer call. This observes on latest Tcl/Threads versions as well (tcl8.4.14 and thread2.6.5) compiled on Solaris 9/i386 using GCC 3.3.2.

  Is this a known issue ? Is thread::transfer requires some extra dealing with transferred filedescriptors before or after transfer ?

  This is a small test:

  #!/usr/local/bin/tclsh

  package require Thread

  proc transfer {channel} {
      global tid

      puts [memory info]
      thread::transfer $tid $channel
      thread::send -async $tid "close $channel"
  }

  proc accept {channel client_addr client_port} {
      after idle [list transfer $channel]
  }

  set tid [thread::create -joinable thread::wait]

  socket -server accept 9999

  thread::wait

  Field "current bytes allocated" increased by 32 bytes after each incoming connection.


tkt_uuid: 487214ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: missing ThreadKill() on unix
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-01-20T00:29:22
comment:
  After restoring ability to build and install Thread
  (see Bug 487213), I try a test:

  $ make test
  /usr/local/lib/../bin/tclsh8.3 ./tests/thread.test
  couldn't load file
  "/usr/local/lib/thread2.3/../libthread2.3.so":
  /usr/local/lib/thread2.3/../libthread2.3.so: undefined
  symbol: ThreadKill
      while executing
  "load /usr/local/lib/thread2.3/../libthread2.3.so"
      ("package ifneeded" script)
      invoked from within
  "package require Thread 2.0"
      (file "./tests/thread.test" line 18)
  make: *** [test] Error 1

  Sure enough, ThreadKillObjCmd() in generic/threadCmd.c
  calls ThreadKill() that is only implemented in
  win/threadWin.c.  The unix implementation is missing.


tkt_uuid: 416850ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 8
foundin: None
title: undocumented commands
cmimetype: text/plain
submitter: davygrvy
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-01-20T00:27:12
comment:
  The thread extension is missing documentation for the 
  following commands:

  thread::mutex,
  thread::cond,
  thread::sv_get,
  thread::sv_exists,
  thread::sv_set,
  thread::sv_incr,
  thread::sv_append,
  thread::sv_lappend,
  thread::sv_array,
  thread::sv_unset


tkt_uuid: 595776ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4b2
title: thread::send manpage innacurate
cmimetype: text/plain
submitter: davidw
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-10-23T20:20:25
comment:
  diff -u -r1.6 thread.n
  --- doc/man/thread.n    22 Jul 2002 19:44:36 -0000      1.6
  +++ doc/man/thread.n    15 Aug 2002 22:58:28 -0000
  @@ -262,7 +262,7 @@
   \&\fBthread::exit\fP
   \&\fBthread::names\fP
   \&\fBthread::exists\fP
  -\&\fBthread::send\fP \fIid\fR ?\fI-async\fR?
  \fIscript\fR ?\fIvarname\fR?
  +\&\fBthread::send\fP ?\fI-async\fR? \fIid\fR
  \fIscript\fR ?\fIvarname\fR?
   \&\fBthread::wait\fP
   \&\fBthread::join\fP \fIid\fR
   \&\fBthread::configure\fP \fIid\fR ?\fIoption\fR?
  ?\fIvalue\fR\fI? ?\fR\fIoption value\fR\fI?...\fR

  Fixes the man page to reflect:

    /*
       * Syntax: thread::send ?-async? threadId script
  ?varName?
       */

  in the source code.


tkt_uuid: 1575342fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.5a6
title: tsv keyed list segfault
cmimetype: text/plain
submitter: juliannoble
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T14:34:26
comment:
  Tclsh 8.5a5 on Windows, 8.5a4 on FreeBSD
  reliably segfault with the following script.

  package require Thread
  tsv::keylset a b c d
  tsv::keylkeys a b x


tkt_uuid: 3407947fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: send to self appears to leak
cmimetype: text/plain
submitter: dgp
assignee: dgp
closer: dgp
closedate: 2012-04-23T20:34:16
comment:
  When [thread::send] sends to itself (the calling thread),
  a "short-circuit" in ThreadSend() calls on ThreadIdleProc()
  to do the work rather than ThreadEventProc().  ThreadIdleProc()
  never arranges to call ThreadFreeProc() to free the clientData.


tkt_uuid: 1716582fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a6
title: Build broken for OPTS=symbols,unchecked
cmimetype: text/plain
submitter: twylite
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T13:14:40
comment:
  The use of -nodefaultlib:msvcrt (in makefile.vc) prevents an unchecked build.

  This flag should not be present; it means that you are linking together objects that use msvcrtd with those that use msvcrt.  While -nodefaultlib gets around linker warnings, this sort of linking is unsafe and can cause subtle and difficult to find bugs.  

  If you build Tcl and Threads with the proper OPTS then
  it shouldn't be required at all.


tkt_uuid: 421246ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Problem with unix compilation in thread/
cmimetype: text/plain
submitter: coldstore
assignee: davygrvy
closer: davygrvy
closedate: 2001-05-27T07:31:21
comment:
  Hi,

  The thread package doesn't compile under my system,
  Linux.

  Problem 1:  Can't configure - lacking config dir
  Fix:
  mkdir config
  automake -a
  before attempting configure.

  Problem 2: THREAD_VERSION* referenced, undeclared in
  ./generic/threadCmd.c
  Fix:
  diff -r ../thread/Makefile.in thread/Makefile.in
  126c126
  < CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
  ---
  > CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
  -DTHREAD_VERSION=\"${VERSION}\"
  -DTHREAD_VERSION_SUBSET83=\"${VERSION}\"

  Colin.


tkt_uuid: 3411244fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: [thread::release -wait [thread::id]] hangs
cmimetype: text/plain
submitter: dgp
assignee: mistachkin
closer: dgp
closedate: 2012-04-23T20:35:29
comment:
  The ThreadReserve() function handles a release
  of the current thread different from release of a
  different thread.  It does this assuming the current
  thread is identified by the magic id value "0".  

  However, if [thread::release -wait [thread::id]] is done,
  then the non-magic normal id of the current thread comes
  in, ThreadReserve() tries to treat it like any other thread,
  and ends up hanging waiting for itself.


tkt_uuid: 2688159fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Invalid
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.6b1
title: Thread module fails to build against 8.6b1
cmimetype: text/plain
submitter: taylor_venable
assignee: vasiljevic
closer: taylor_venable
closedate: 2009-03-24T18:31:48
comment:
  The thread module version 2.6.5 fails to build against Tcl 8.6b1.  I have seen this on OpenBSD 4.5 i386 w/ --enable-threads configure option, and also on Ubuntu 8.10 x86_64 w/ --enable-threads --enable-64bit configure options.  The same error message in both cases is:

  gcc -pipe -DPACKAGE_NAME=\"thread\" -DPACKAGE_TARNAME=\"thread\" -DPACKAGE_VERSION=\"2.6.5\" -DPACKAGE_STRING=\"thread\ 2.6.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1   -I"/usr/local/include"    -O2 -Wall -Wno-implicit-int -fPIC -c `echo ./generic/threadSvCmd.c` -o threadSvCmd.o
  generic/threadSvCmd.c: In function `SvLockObjCmd':
  generic/threadSvCmd.c:2055: error: structure has no member named `errorLine'
  generic/threadSvCmd.c: In function `Sv_Init':
  generic/threadSvCmd.c:2156: warning: assignment discards qualifiers from pointer target type
  generic/threadSvCmd.c:2157: warning: assignment discards qualifiers from pointer target type
  generic/threadSvCmd.c:2158: warning: assignment discards qualifiers from pointer target type
  generic/threadSvCmd.c:2159: warning: assignment discards qualifiers from pointer target type
  generic/threadSvCmd.c:2160: warning: assignment discards qualifiers from pointer target type
  generic/threadSvCmd.c: At top level:
  generic/threadSvCmd.c:2236: warning: `SvFinalize' defined but not used
  gmake: *** [threadSvCmd.o] Error 1

  On the OpenBSD machine, this is the information in tcl_platform:

  tcl_platform(byteOrder)     = littleEndian
  tcl_platform(machine)       = i386
  tcl_platform(os)            = OpenBSD
  tcl_platform(osVersion)     = 4.5
  tcl_platform(pathSeparator) = :
  tcl_platform(platform)      = unix
  tcl_platform(pointerSize)   = 4
  tcl_platform(threaded)      = 1
  tcl_platform(user)          = taylor
  tcl_platform(wordSize)      = 4

  (The Linux platform information is not specified because I don't have access to it at the moment.)  I can provide additional information or try other things upon request.


tkt_uuid: 3448556fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.11
title: Segmentation fault on exit in tsv
cmimetype: text/plain
submitter: tombert
assignee: vasiljevic
closer: vasiljevic
closedate: 2011-12-08T17:37:45
comment:
  Sometimes my Tcl app crashes in between, but I'am somehow able to reproduce crashes (1 out of 5) when doing exit. I was able to trace this down with gdb.
  I looks like it is caused by the thread shared variables. Unfort. I havn't been able to create a simple tcl script to reproduce this problem.
  My Environment is WinXP, Tcl 8.5.11, Thread 2.7, Compiled with MinGW; Linux I didn't try.
  Thx


  (gdb) frame 0
  #0  0x6220a9e8 in Sp_RecursiveMutexLock (muxPtr=0x6c8)
      at ./generic/threadSpCmd.c:1536
  1536        if (*muxPtr == (Sp_RecursiveMutex_*)0) {
  (gdb) up
  #1  0x62206524 in LockArray (interp=0x17baf8e0, array=0x17e4eed0 "host",
      flags=0) at ./generic/threadSvCmd.c:728
  728         LOCK_BUCKET(bucketPtr); /* Note: no matching unlock below ! */
  (gdb)
  #2  0x62205d8e in Sv_GetContainer (interp=0x17baf8e0, objc=3,
      objv=0x17ba3c1c, retObj=0xd78f0b8, offset=0xd78f0bc, flags=0)
      at ./generic/threadSvCmd.c:338
  338             arrayPtr = LockArray(interp, array, flags);
  (gdb)
  #3  0x62207a7f in SvGetObjCmd (arg=0x0, interp=0x17baf8e0, objc=3,
      objv=0x17ba3c1c) at ./generic/threadSvCmd.c:1570
  1570        ret = Sv_GetContainer(interp, objc, objv, &svObj, &off, 0);
  (gdb)
  #4  0x64d92aa9 in TclEvalObjvInternal (interp=0x17baf8e0, objc=3,
      objv=0x17ba3c1c, command=0xffffffff <Address 0xffffffff out of bounds>,
      length=-1, flags=0) at ./../generic/tclBasic.c:3703
  3703            code = (*cmdPtr->objProc)(cmdPtr->objClientData, interp, objc, o
  bjv);
  (gdb)
  #5  0x64de4ba5 in TclExecuteByteCode (interp=0x17baf8e0, codePtr=0x17f17ed0)
      at ./../generic/tclExecute.c:2416
  2416                result = TclEvalObjvInternal(interp, objc, objv,
  (gdb)
  #6  0x64e3624a in TclObjInterpProcCore (interp=0x17baf8e0,
      procNameObj=0x17e64d10, skip=1, errorProc=0x64e3675d <MakeProcError>)
      at ./../generic/tclProc.c:1763
  1763            result = TclExecuteByteCode(interp, codePtr);
  (gdb)
  #7  0x64e361bd in TclObjInterpProc (clientData=0x17f129b8, interp=0x17baf8e0,
      objc=3, objv=0x17f15b60) at ./../generic/tclProc.c:1653
  1653            return TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError);

  (gdb)
  #8  0x64d92aa9 in TclEvalObjvInternal (interp=0x17baf8e0, objc=3,
      objv=0x17f15b60, command=0x0, length=0, flags=131072)
      at ./../generic/tclBasic.c:3703
  3703            code = (*cmdPtr->objProc)(cmdPtr->objClientData, interp, objc, o
  bjv);
  (gdb)
  #9  0x64d92ffc in Tcl_EvalObjv (interp=0x17baf8e0, objc=3, objv=0x17f15b60,
      flags=131072) at ./../generic/tclBasic.c:3901
  3901        code = TclEvalObjvInternal(interp, objc, objv, NULL, 0, flags);
  (gdb)
  #10 0x64d94540 in TclEvalObjEx (interp=0x17baf8e0, objPtr=0x17bb6f38,
      flags=131072, invoker=0x0, word=0) at ./../generic/tclBasic.c:5129
  5129            result = Tcl_EvalObjv(interp, nelements, elements, flags);
  (gdb)
  #11 0x64d94414 in Tcl_EvalObjEx (interp=0x17baf8e0, objPtr=0x0, flags=131072)
      at ./../generic/tclBasic.c:5054
  5054        return TclEvalObjEx(interp, objPtr, flags, NULL, 0);
  (gdb)
  #12 0x64e48406 in AfterProc (clientData=0x17f258f0)
      at ./../generic/tclTimer.c:1145
  1145        result = Tcl_EvalObjEx(interp, afterPtr->commandPtr, TCL_EVAL_GLOBAL
  );
  (gdb)
  #13 0x64e47666 in TimerHandlerEventProc (evPtr=0xaaad7b8, flags=-3)
      at ./../generic/tclTimer.c:578
  578             (*timerHandlerPtr->proc)(timerHandlerPtr->clientData);
  (gdb)
  #14 0x64e251eb in Tcl_ServiceEvent (flags=-3) at ./../generic/tclNotify.c:675
  675             result = (*proc)(evPtr, flags);
  (gdb)
  #15 0x64e255c7 in Tcl_DoOneEvent (flags=-3) at ./../generic/tclNotify.c:978
  978             if (Tcl_ServiceEvent(flags)) {
  (gdb)
  #16 0x622044a5 in ThreadWait () at ./generic/threadCmd.c:2779
  2779            Tcl_DoOneEvent(TCL_ALL_EVENTS);


tkt_uuid: 1521416fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.4.19
title: thread::release on win32 does not release all memory
cmimetype: text/plain
submitter: nobody
assignee: mistachkin
closer: mistachkin
closedate: 2012-11-19T20:22:02
comment:
  The original usenet posting - 
   All 5 messages in topic - view as tree

  From:usenet....@googlemail.com - view profile
  Date:Tues, Jul 11 2006 11:01 am
  Email: usenet....@googlemail.com
  Groups: comp.lang.tcl
  Not yet rated
  Rating: 
  show options

  Reply | Reply to Author | Forward | Print | Individual
  Message | Show original | Report Abuse | Find messages
  by this author

  I am running tcl 8.4 on Windows XP Pro 2002, SP2.
  The simple script below fails on thread::create right
  under 12,000
  iterations.

  Attempts to create any more threads fail in the same
  shell once a call
  to
  thread::create fails.
  Restarting tclsh and rerunning seems to work fine
  within the limits
  mentioned
  above.

  Would anyone know the reason this would fail?

  ---------------
  tclsh
  package require Thread
  set i 1
  while { 1 } {
    set id [thread::create]
    thread::release $id
    puts -nonewline " $i "
    flush stdout
    update
    incr i

  } 




  From:David Gravereaux - view profile
  Date:Wed, Jul 12 2006 12:17 pm
  Email: David Gravereaux <davyg...@pobox.com>
  Groups: comp.lang.tcl
  Not yet rated
  Rating: 
  show options

  Reply | Reply to Author | Forward | Print | Individual
  Message | Show original | Report Abuse | Find messages
  by this author

  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  joe,

  I ran your script this time and I see what's going on :)

  The Tclsh process runs out of virtual memory space! 
  Not committed
  memory..  True VM allocations.  I even tried the old
  fashioned way with
  thread::wait and thread::unwind that I personally know
  for a fact do not
  leak handles..  The issue is not a handle leak.  The
  issue is not
  committed memory (apparently), but it appears that for
  each thread
  created, a slice of VM is given to it permanently and
  that slice isn't
  recouped (though it appears to have been uncommitted).

  Joe, insert your script as a new bug.  There's
  something going on that's
  a bit deeper than proper handle management.

  the Old way (that has the same behavior):

  package require Thread
  set i 1
  while { 1 } {
    set id [thread::create {thread::wait}]
    thread::send -async $id {thread::unwind}
    puts -nonewline " $i "
    flush stdout
    update
    incr i

  }


tkt_uuid: 620154ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Thread termination with TCL
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: vasiljevic
closedate: 2003-05-30T16:42:26
comment:
  The documantion (http://cvs.sourceforge.net/cgi-
  bin/viewcvs.cgi/*checkout*/tcl/thread/doc/html/thread.html) has 
  got some warnings about the functions "thread::exit" and 
  "thread::unwind".
  Should some advices from the programming 
  language "Java" 
  (http://java.sun.com/j2se/1.4.1/docs/guide/misc/threadPrimitiveDeprecation.html) 
  be added to the descriptions?


tkt_uuid: 3091176fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Ttrace package out of sync with Thread package
cmimetype: text/plain
submitter: jima00
assignee: vasiljevic
closer: dgp
closedate: 2010-11-16T19:54:10
comment:
  Ttrace package provides version 2.6.5 whilst Thread package aims for version 2.6.6.

  This makes ttrace to launch an error message when invoked.

  The tweak would go in line 65 of ttrace.tcl file.

  package provide Ttrace 2.6.6 


tkt_uuid: 1473261fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: Thread
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2006-09-06T13:56:17
comment:
  The following code occassionally crashes on Linux/x86 
  and 8.4.13 + thread 2.6.3:

  package require Thread; set t [thread::create]; thread
  ::release $t; exit

  The following error occurs:
  Tcl_Release couldn't find reference for 0x80e0450

  Unfortunately GDB stack trace (attached) does not show 
  much information.

  It happens once each about 20 runs on my machine, it 
  may vary though.


tkt_uuid: 1851243fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: typo of tpool's man
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: ferrieux
closedate: 2009-05-04T21:58:01
comment:
  I found a little typo of manual of tpool.
  maxthreads and minthreads option is now 
  maxworkers and minworkers.


tkt_uuid: 746352ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: warnings: operator== and not all paths return a value
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2003-05-31T10:47:09
comment:
  Thread 2.5.2
  modified function ListRemoveInner (threadCmd.c)
      } else if (tsdPtr == threadList) {
          threadList = NULL;   // was a == 
      }

  modified function Sp_Init (threadSpCmd.c)
    added return 0 because function is int


tkt_uuid: 1516686fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 8
foundin: None
title: Crash with Tcl 8.5 on x86_64
cmimetype: text/plain
submitter: mic42
assignee: vasiljevic
closer: hobbs
closedate: 2007-06-10T21:26:45
comment:
  I see a segfault when compiling Thread (cvs) against
  Tcl 8.5 (cvs) on my SUSE 10.1 x86_64 machine.

  The following script crashes Tcl.
  (basically from the testsuit thread-4.4)
  load ./libthread2.6.3.so Thread
  set tid [thread::create -joinable {set x 5}]
  thread::join $tid

  The crash does not happen in an --enable-symbols build.

  I have linked tcl and thread with efence to find
  something, and run the script inside gdb.

  schlenk@chronos:~/devel/thread> gdb ../tcl/efence/tclsh
  GNU gdb 6.4
  This GDB was configured as "x86_64-suse-linux"...Using
  host libthread_db library "/lib64/libthread_db.so.1".

  (gdb) run
  Starting program: /home/schlenk/devel/tcl/efence/tclsh
  [Thread debugging using libthread_db enabled]
  [New Thread 47191154113392 (LWP 9563)]

    Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce
  Perens <bruce@perens.com>
  [New Thread 1082132800 (LWP 9566)]
  % source crash.tcl
  [New Thread 1090525504 (LWP 9567)]
  [Thread 1090525504 (zombie) exited]

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 47191154113392 (LWP 9563)]
  TclEvalObjvInternal (interp=0x2aeb8bffbc70, objc=2,
  objv=0x7fff1f2c5320,
      command=0x2aeb8c06403d "thread::join $tid\n",
  length=18, flags=0)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3394
  3394        if (!(cmdPtr->flags & CMD_IS_DELETED)) {

  This is the resulting stack trace:

  #0  TclEvalObjvInternal (interp=0x2b5c2cf2bc70, objc=2,
  objv=0x7fff7e3933f0,
      command=0x2b5c2cf9383d "thread::join $tid\n",
  length=18, flags=0)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3394
  #1  0x0000000000467cd0 in Tcl_EvalEx
  (interp=0x2b5c2cf2bc70,
      script=0x2b5c2cf937f0 "load ./libthread2.6.3.so
  Thread\nset tid [thread::create -joinable {set x
  5}]\nthread::join $tid\n",
      numBytes=<value optimized out>, flags=<value
  optimized out>)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3788
  #2  0x000000000042344f in Tcl_FSEvalFileEx
  (interp=0x2b5c2cf2bc70,
      pathPtr=0x2b5c2cf3cf00, encodingName=<value
  optimized out>)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclIOUtil.c:1805
  #3  0x0000000000479de2 in Tcl_SourceObjCmd
  (dummy=<value optimized out>,
      interp=0x2b5c2cf2bc70, objc=<value optimized out>,
  objv=0x2b5c2cf45078)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclCmdMZ.c:959
  #4  0x00000000004676b2 in TclEvalObjvInternal
  (interp=0x2b5c2cf2bc70, objc=2,
      objv=0x2b5c2cf45078, command=0x0, length=0, flags=0)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclBasic.c:3381
  #5  0x0000000000497bdd in TclExecuteByteCode
  (interp=0x2b5c2cf2bc70,
      codePtr=0x2b5c2cf20e70)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclExecute.c:1795
  #6  0x000000000049edcf in TclCompEvalObj
  (interp=0x2b5c2cf2bc70,
      objPtr=0x2b5c2cf41e80)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclExecute.c:1003
  ---Type <return> to continue, or q <return> to quit---
  #7  0x0000000000468340 in Tcl_EvalObjEx
  (interp=0x2b5c2cf2bc70,
      objPtr=0x5e0b38, flags=131072)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclBasic.c:4058
  #8  0x00000000004a45db in Tcl_RecordAndEvalObj
  (interp=0x2b5c2cf2bc70,
      cmdPtr=0x2b5c2cf41e80, flags=131072)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclHistory.c:146
  #9  0x00000000004263d2 in Tcl_Main (argc=754371952,
  argv=0x2b5c2cfc7770,
      appInitProc=0x412ac0 <Tcl_AppInit>)
      at
  /home/schlenk/devel/tcl/unix/../generic/tclMain.c:546
  #10 0x0000000000412b10 in main (argc=754105456,
  argv=0x5e0b38)
      at /home/schlenk/devel/tcl/unix/../unix/tclAppInit.c:87


tkt_uuid: 1759529fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a7
title: Thread tests fails on netbsd
cmimetype: text/plain
submitter: egavilan
assignee: vasiljevic
closer: ferrieux
closedate: 2009-05-11T21:04:23
comment:
  while running the tests on netbsd-4, tcl from CVS thread-enabled and thread package from CVS, I get this error:

  emiliano@maq033:~/tcl_sources/thread$ make test 
  TCL_LIBRARY=`echo /home/emiliano/tcl_sources/tcl/library`  TCL_THREAD_LIBRARY=`echo ./lib`  LD_LIBRARY_PATH=".:/home/emiliano/tcl_sources/tcl/unix:"  PATH=".:/home/emiliano/tcl_sources/tcl/unix:/home/emiliano/programas/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin"  TCLLIBPATH=". ./../lib" /home/emiliano/tcl_sources/tcl/unix/tclsh `echo ./tests/all.tcl` 
  Tcl 8.5a7 tests running in interp:  /home/emiliano/tcl_sources/tcl/unix/tclsh
  Tests running in working dir:  /home/emiliano/tcl_sources/thread/tests
  Only running tests that match:  *
  Skipping test files that match:  l.*.test
  Only sourcing test files that match:  *.test
  Tests began at Tue Jul 24 09:24:21 ART 2007
  Thread 2.6.5
  Mainthread id is tid0xbf800000
  thread.test
  tpool.test
  tsv.test
  ttrace.test

  Tests ended at Tue Jul 24 09:24:36 ART 2007
  all.tcl:        Total   116     Passed  116     Skipped 0       Failed  0
  Sourced 0 Test Files.
  tclsh: Error detected by libpthread: Destroying condition variable in use.
  Detected by file "/home/builds/ab/netbsd-4/src/lib/libpthread/pthread_cond.c", line 93, function "pthread_cond_destroy".
  See pthread(3) for information.
  [1]   Abort trap (core dumped) TCL_LIBRARY=$(.....
  *** Error code 134

  Stop.
  make: stopped in /home/emiliano/tcl_sources/thread
  emiliano@maq033:~/tcl_sources/thread$

  The error is also shown using Tcl 8.4.15 with Thread 2.6.5 


tkt_uuid: 464340ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: thread::send might send to wrong interp
cmimetype: text/plain
submitter: vasiljevic
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-01-20T00:28:38
comment:
  Consider:

  set script {
     package require Thread
     set worker [thread::create {
       proc evaluate {cbThread script cbScript} {
         thread::send $cbThread\
           [list $cbScript [thread::id] [eval $script]]
       }
       thread::wait
     }]
     proc callback {thread value} {
       set ::continue {}
     }
     thread::send -async $worker \
         "evaluate [thread::id] list callback"
     vwait ::continue
     puts "$worker done"

  }

  set interp1 [interp create]
  $interp1 eval $script
  set interp2 [interp create]
  $interp2 eval $script

  The interp1 evaluation works fine. 
  The interp2 evaluation blocks indefinitely. 
  This is because the callback is executed in the
  wrong interpreter. The threading extension
  evaluates callbacks always in the main interpreter
  i.e. one which was active when the thread was started.

  Thanks for Jean-Luc Fontaine for pointing this out.


tkt_uuid: 2980235fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: command pollution in interps w/o package require
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2010-09-28T19:46:05
comment:
  The pkgIndex.tcl file for the Thread and Ttrace
  packages creates the commands [::thread_load]
  and [::thread_source] inside every interp that
  happens to run [::tclPkgUnknown], whether or
  not that interp ever actually does a [package require]
  on Thread or Ttrace.  This is unwelcome pollution.
  Bad by any measure.  Doubly bad in the global namespace.

  This is very easy to fix with the use of the
  [::apply] command, so long as a dependence on
  Tcl 8.5 is permissible.

  If there is movement to better separate the two
  packages (see message on TCLCORE), then
  the index script may change enough as a result
  of that to make the issue go away.


tkt_uuid: 1051068fffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: Testsuite crashes, Windows, 8.4
cmimetype: text/plain
submitter: andreas_kupries
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-11-25T15:18:16
comment:
  Running testsuite of thread against an 8.5 core (head)
  is ok. doing the same against an 8.4 core (branch head)
  crashes the tests 14.4, 19.8, 19.9, and 19.11. This is
  always in Sp_RecursiveMutexUnlock (threadSpCmd.c, line
  1395). It actually gpf's in the NTDLL function called
  from that location.

  The platform is Win 2000. The thread package was CVS
  head as well.


tkt_uuid: 219324ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 8
foundin: final: 8.2.3
title: (tcltest) ThreadErrorProc not always called
cmimetype: text/plain
submitter: nobody
assignee: davygrvy
closer: davygrvy
closedate: 2001-04-26T08:29:07
comment:
  OriginalBugID: 3957 Bug
  Version: 8.2.3
  SubmitDate: '1999-12-29'
  LastModified: '2000-10-25'
  Severity: MED
  Status: UnAssn
  Submitter: techsupp
  OS: SunOS
  OSVersion: 5.6
  Machine: Sun Ultra
  FixedDate: '2000-10-25'
  ClosedDate: '2000-10-25'


  Name:

  Peter Silsbee


  Extensions:

  With tcltest, none. Separately, Expect, Tk, tix.


  CustomShell:

  N/A


  Comments:

  Patch is tentative. I'm totally unfamiliar with Tcl source, and have basically no idea what side effects it might cause!


  ReproducibleScript:

  Command line: tcltest script.tcl


  script.tcl:


  set errorthread [testthread create]


  set cmd "proc errorHandler \{id ei\} \{\

  puts \"This is my error procedure.\";\

  puts \"The thread is \$id\";\

  puts \"The errorInfo is <\$ei>\";\

  }"


  testthread send $errorthread $cmd

  testthread send $errorthread "testthread errorproc errorHandler"


  puts "About to commit an error in non-waiting thread"

  testthread create "set nonexistent"


  set thread2 [testthread create]


  puts "About to commit an error in the thread that is waiting"

  testthread send $thread2 "set nonexistent"


  after 2000


  puts "I survived to the end of the script"

  puts "The remaining threads are [testthread names]"


  ObservedBehavior:

  The procedure "errorHandler" is only called when an error occurs during "testthread create" script evaluation. When an error occurs during "testthread send" evaluation, ThreadErrorProc is never called.


  DesiredBehavior:

  ThreadErrorProc, hence errorHandler if registered, should be called on any thread error?


  Patch:

  *** generic/tclThreadTest.c.oldSat Oct 30 05:06:01 1999

  --- generic/tclThreadTest.c.newWed Dec 29 10:27:35 1999

  ***************

  *** 817,822 ****

  --- 817,830 ----

    if (code != TCL_OK) {

        errorCode = Tcl_GetVar(interp, "errorCode", TCL_GLOBAL_ONLY);

        errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);

  +     ThreadErrorProc(interp);

  +     if (errorProcString != NULL) {

  +       /*

  +        * assume registered error handler can take care of things

  +        */

  +       code = TCL_OK;

  +       errorCode = errorInfo = NULL;

  +     }

    } else {

        errorCode = errorInfo = NULL;

    }


  PatchFiles:

  tclThreadTest.c


tkt_uuid: 1073161fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: Wrong assignment in ListRemoveInner
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-11-25T15:24:00
comment:
  leopold.gerlinger@siemens.com

  During compilation of Thread 2.5.2 i saw a compiler 
  warning in procedure 'ListRemoveInner'. Test for equality 
  where an assignment is expected - I believe.

  Code follows:

  static void
  ListRemoveInner(tsdPtr)
      ThreadSpecificData *tsdPtr;
  {
      if (tsdPtr->prevPtr || tsdPtr->nextPtr) {
          if (tsdPtr->prevPtr) {
              tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr;
          } else {
              threadList = tsdPtr->nextPtr;
          }
          if (tsdPtr->nextPtr) {
              tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr;
          }
          tsdPtr->nextPtr = NULL;
          tsdPtr->prevPtr = NULL;
      } else if (tsdPtr == threadList) {
          threadList == NULL;
      }
  }

  The last statement should read (IMHO):

          threadList = NULL;


tkt_uuid: 503451ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 8
foundin: None
title: Thread: Unknown "ThreadKill" function
cmimetype: text/plain
submitter: andreas_kupries
assignee: davygrvy
closer: andreas_kupries
closedate: 2002-01-14T18:47:15
comment:
  The command "thread::kill" (ThreadKillObjCmd) uses a 
  function "ThreadKill" which was unknown when I tried 
  to compile the package for Linux (linker bailed out). 
  I suspect that this function is a Win*-specific API. 
  Hence my initial assignment of this report to David.

  If my suspicion is confirmed we will need a TIP to 
  extend the public API of Tcl with a 
  generic "Tcl_ThreadKill" function analogous 
  to "Tcl_ThreadExit", albeit with a different signature.

  The nearest POSIX command to perform the same 
  operation is "pthread_kill" which sends a signal to a 
  specific thread. But I don't know if Tcl (or Linux) 
  knows how to deal with such.

  I do not know if there is something equivalent on the 
  Mac.


tkt_uuid: 1835061fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5b2
title: Fail to build and test thread on Win32/MSVC
cmimetype: text/plain
submitter: twylite
assignee: vasiljevic
closer: patthoyts
closedate: 2009-05-04T22:47:48
comment:
  Problems in the makefile.vc and test files prevent the thread package from being successfully built on Win32 using MSVC6 or MSVC8.

  (1) The link flag -nodefaultlib:msvcrt has been added in the case of non-static builds (which must link against MSVCRT).  This was probably added in error because Thread failed to link against a Tcl DLL which was compiled with different library flags (-MT instead of -MD).  This flag must be removed.

  (2) tests/all.tcl doesn't correctly load the Thread DLL (specified via -loadfile by the makefile.vc), so tests can't run at all.

  (3) tests/thread.test attempts to resolve $::tcl_PatchLevel on non-unix platforms (note capatalisation error: should be $::tcl_patchLevel).

  The attached patch fixes all these errors and bumps the package version to 2.6.6 (in configure.in and pkg.vc).  The maintainer will need to reconfigure.


tkt_uuid: 2511424fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: condition variable error in thread-21.16
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: ferrieux
closedate: 2009-05-04T00:16:04
comment:
  ==== thread-21.16 thread::cond - delete waited variable FAILED
  ==== Contents of test case:

      ThreadReap
      set tid [thread::create]
      set emutex [thread::mutex create]
      set cond [thread::cond create]
      thread::send -async $tid [subst {
          thread::mutex lock $emutex
          thread::cond wait $cond $emutex 500
          thread::mutex unlock $emutex
      }]
      update
      after 10
      set c1 [catch {thread::cond destroy $cond} r1]
      thread::cond notify $cond
      after 1000
      set c2 [catch {thread::cond destroy $cond} r2]
      ThreadReap
      thread::mutex destroy $emutex
      list $c1 $c2 $r1 $r2

  ---- Test generated error; Return code was: 1
  ---- Return code should have been one of: 0 2
  ---- errorInfo: no such condition variable "cid30"
      while executing
  "thread::cond notify $cond"
      ("uplevel" body line 14)
      invoked from within
  "uplevel 1 $script"
  ---- errorCode: NONE
  ==== thread-21.16 FAILED


tkt_uuid: 487213ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Thread does not build with Tcl 8.3
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-01-20T00:31:01
comment:
  The current HEAD revision of the Thread
  package doesn't configure, make, and
  make install cleanly on Linux(/Alpha)
  against Tcl 8.3.  Notably there's a
  missing substitution in pkgIndex.tcl,
  and a header file rename that hadn't
  been reflected in Makefile.in.

  Here's a patch, that restores
  installability, though not correct
  functioning.  (see next bug report)

  Hmmm.... looking at the patch, I see
  a dilemma over what version of
  autoconf to use.  Apparently the current
  HEAD was built with 2.52, but that appears
  to have cause configure failure (looking
  for a non-exitent config/config.sub file?)
  on Linux.  After adding the 

  AC_SUBST(THREAD_VERSION_SUBSET83)

  to configure.in, I just regen'd using
  autoconf 2.13, just cause that's what I have
  installed.  If this choice matters, we ought
  to come to an agreement on it.


tkt_uuid: 2980143fffffffffffffffffffffffffffffffff
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 8
foundin: None
title: support return options
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
comment:
  The schemes in place to transport the
  values of -errorinfo and -errorcode
  produce by script evaluation in one thread
  over to a different thread have not been updated
  to accomodate the expanded return options
  dictionary that is part of Tcl 8.5+.

  Something I think should be corrected in a Thread 2.7.


tkt_uuid: 674514ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 1 Zero
foundin: None
title: Is Tcllib thread safe? - code analysis, flaw detection
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: elfring
closedate: 2003-01-29T14:05:09
comment:
  Do you know which functions of the Tcl Standard Library can be used 
  safely (no extra synchronization needed) with Tcl threads?
  When 
  will the information be added to the documentation 
  (http://tcllib.sourceforge.net/doc/index.html)whether a function in 
  this application programming interface is thread-safe or 
  asynchronous-safe or not?


tkt_uuid: 1643367fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a5
title: Thread extension cannot compile with VC8
cmimetype: text/plain
submitter: ctasada
assignee: vasiljevic
closer: patthoyts
closedate: 2009-05-04T22:10:35
comment:
  I've just upgraded my system to use VC8 and the Thread extension doesn't compile :(

  The error that I get is:

  makefile.vc(12) : fatal error U1050:
  You'll need to run vcvars32.bat from Developer Studio, first, to setup
  the environment.  Jump to this line to read the new instructions.

  Tcl, Tk and Itcl compiles without problem and I see that some changes has been done to the makefile.vc. Seems that the Thread package is not in sync with the rest.

  Thanks a lot.


tkt_uuid: 1095535fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Wrong Documentation
cmimetype: text/plain
submitter: hboeken
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T15:40:46
comment:
  The documentation for Thread 2.5.2 contains the following:

  tsv::exists
      Checks wether the element exists in the shared
  array. If the element is not given it tests the
  existence of the array itself. Returns true (1) if the
  item exists, false (0) if not.


  However, given a shared array 'MyArray' and executing
  the command
  tsv::exists MyArray 
  the following error is raised:
  wrong # args: should be "tsv::exists array key ?args?"
      while executing
  "tsv::exists MyArray"

  The command
  tsv::array exists MyArray
  must be used in this case.


tkt_uuid: 1356721fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a3
title: tcl8.5a3 segfault foreach loop thread creation
cmimetype: text/plain
submitter: nickpa
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T14:55:21
comment:
  tcl crashes when I launch multiple (5) threads and then 
  send scripts to it (async). 

  running on the following system:

  tclver: 8.5a3 (none cvs)
  os: Linux 2.6.13.4 #1 SMP Mon Oct 17 19:19:27 CEST 
  2005 i686 GNU/Linux (debian)

  I have to add that I have only been able to reproduce the 
  error with 'package require tls' within the newly created 
  threads. Also, it looks like it is some kind of racing 
  condition; it barely crashes on a system with high loads, 
  with low loads it does. 

  Below is an example of what I see when I run the script.

  ns2986:/home/nick/ # /usr/tcl85/bin/tclsh8.5 crash.tcl
  Menu
  l
  launching thead:1
  launching thead:2
  launching thead:3
  Segmentation fault

  NOTE: sometimes I have to start and close the script 
  again and then type 'l' to launch the thread creation, for 
  it to segfault. So it does not ALWAYS crash, it does 
  crash a lot though.

  Hope this helps you guys, might be my system, tls 
  package or TCL.

  I'v attached the script for testing purposes.

  Kind Regards,

  Nick Parrin


tkt_uuid: 503446ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 7 High
foundin: None
title: Thread: Installation of headers fails
cmimetype: text/plain
submitter: andreas_kupries
assignee: andreas_kupries
closer: andreas_kupries
closedate: 2002-01-15T21:17:58
comment:
  The thread package tries to install the 
  header "thread/generic/thread.h", which does not 
  exist. The correct file is "thread/generic/tclThread.h"

  Enclosed a patch to correct this.


tkt_uuid: 3563391fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Drop unused SpBucket fields
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: dgp
closedate: 2012-09-13T13:53:13
comment:
  The struct SpBucket declared in threadSpCmd.h has two
  fields, lockt and freeCt, that are never used anywhere.

  In the interest of simplification, I request we remove them.

  I would also like some comments added explaining the
  default value of 

  #define NUMSPBUCKETS 32

  and why someone customizing Thread source code might
  choose some other value.

  I think I'd be just as happy with a value of 1 myself, but that
  may be an opinion founded in ignorance.


tkt_uuid: 1163357fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5a3
title: build dir outside source dir not supported
cmimetype: text/plain
submitter: dgp
assignee: vasiljevic
closer: vasiljevic
closedate: 2005-03-15T08:57:24
comment:
  $ gunzip -c thread2.6.1.tar.gz | tar xf -
  $ mkdir build
  $ cd build
  $ ../thread2.6.1/configure
  ...
  $ make test
  ...
  couldn't read file "./ttrace.tcl": no such file or
  directory
      while executing
  "source [file join . ttrace.tcl]"
      invoked from within
  "if {[file readable [file join . .. lib ttrace.tcl]]} { 
              source [file join . .. lib ttrace.tcl]
          } else {
              source [file j..."
      ("package ifneeded" script)
      invoked from within
  "package require Thread 2.6"
      (file "../thread2.6.1/tests/all.tcl" line 46)

  The pkgIndex.tcl file is constructed to
  look for the files ../lib/ttrace.tcl or ttrace.tcl
  relative to the $dir that holds pkgIndex.tcl.
  This implies that only builds in subdirs of
  thread.2.6.1 can be tested prior to installation.

  It should not be so.  Other build dirs should
  be supported.


tkt_uuid: 612513ffffffffffffffffffffffffffffffffff
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Detect deadlocks with TCL
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-06-19T19:48:12
comment:
  I've read under "http://java.sun.com/j2se/1.4.1/changes.html#vm" about a utility that can detect deadlocks 
  with the programming language "Java". (Example listing: 
  http://java.sun.com/j2se/1.4.1/sample-output.html)

  Can a similar tool be offered for the programming language "TCL"?


tkt_uuid: 3411242fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: None
title: [thread::release -wait] crashes
cmimetype: text/plain
submitter: dgp
assignee: dgp
closer: dgp
closedate: 2012-04-19T16:26:37
comment:
  Implementation of [thread::release] doesn't properly
  support the command syntax of a single argument
  which is the option "-wait".  When it sees this, it
  still attempts to read the thread id from the second
  argument which is not there -- CRASH!


tkt_uuid: 1267256fffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 7 High
severity: Minor
foundin: None
title: enable static linking when TclX is present
cmimetype: text/plain
submitter: matt-newman
assignee: vasiljevic
closer: jan.nijtmans
closedate: 2457716.87509038
comment:
  When you statically link the thread extension w/ the 
  TclX extension you get multiple defines - this patch 
  addresses this issue in a minimal impact way.


tkt_uuid: 3033206fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: lib/ttrace.tcl uses ::version as temporary variable
cmimetype: text/plain
submitter: thommey
assignee: dkf
closer: dkf
closedate: 2010-07-25T22:23:42
comment:
  The thread package includes lib/ttrace.tcl - loaded by [package require Ttrace] - uses $::version to temporarily store the result of [package require Thread] in a catch ("catch {package require Thread} version"). This global variable is unfortunately very likely to be used by applications (embedders mostly?) to hold their own version number. Eggdrop, for example, protects that variable as read-only with a write trace, causing [package require Ttrace] to fail because it can't write to that variable (and even if it could, it would overwrite Eggdrops version number and existing Tcl scripts for Eggdrop rely on it).
  I'd suggest changing it to anything else or a namespace variable.


tkt_uuid: 3439599fffffffffffffffffffffffffffffffff
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.6b2
title: thread::cancel not reporting error
cmimetype: text/plain
submitter: dgp
assignee: mistachkin
comment:
  $ cat demo2.tcl
  package require Thread 2.7

  set ::bar "NO ERROR THROWN"
  proc ::foo {id info} {
      set ::bar "Thread $id stack:\n$info"
  }
  thread::errorproc ::foo

  set one [thread::create -joinable {while 1 {}}]
  thread::cancel $one
  thread::join $one
  puts stderr "SAVED ERROR: $::bar"


  $ make shell SCRIPT=demo2.tcl
  ...
  SAVED ERROR: NO ERROR THROWN


tkt_uuid: 1245204fffffffffffffffffffffffffffffffff
type: Patch
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Support for non-standard gdbm location
cmimetype: text/plain
submitter: furukawa
assignee: vasiljevic
closer: vasiljevic
closedate: 2005-07-28T08:14:04
comment:
  I'm interested in the persistent variable feature. 
  However, my gdbm is in a non-standard directory. 

  On the configure command line, if we specify
  "--with-gdbm=/directory", a message "error: none found"
  is printed and libgdbm.a is never found.  The library
  file checking structure is not quite right, and the
  simplest fix is to remove the last else clause in
  aclocal.m4.  

  The patch file "thread2.6.1-aclocal.m4.patch" fixes the
  problem, although I think there may be a better fix. I
  think this problem may have been caused by an incorrect
  indentation at the beginning of the file.  

  Cheers.

  Kazuro Furukawa
  kazuro.furukawa at kek.jp


tkt_uuid: 3057497fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.6b1.1
title: pkgIndex versions out of date on Win32
cmimetype: text/plain
submitter: twylite
assignee: vasiljevic
closer: dgp
closedate: 2010-09-02T13:18:15
comment:
  When building under MSVC on WIN32 the pkgIndex.tcl file is created by the makefile.vc using constants in pkg.vc.  The PACKAGE_VERSION in pkg.vc is out of date, so Threads cannot be loaded into the interpreter.

  Patch:

  diff -r1.8 pkg.vc
  6c6
  < PACKAGE_VERSION       = "2.6.5"
  ---
  > PACKAGE_VERSION       = "2.6.6"


tkt_uuid: 1464731fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: Memory leak in Thread release
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T14:59:39
comment:
  Hi,
       It seems there is memory leak in Thread release 
  call. I have attched the sample script for 
  Theread "create/release". For each thread release 
  there was around 65KB of memory leak. More over if I 
  provide any package in Thread send call the leak was 
  pretty much high(400KB).So please have look into this 
  issue and suggest me a solution.

  OS : Windows 2000
  Thanks,
  Karthik
  Email:karthikk@hcl.in


tkt_uuid: 838831ffffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Add some tsv functions
cmimetype: text/plain
submitter: elfring
assignee: vasiljevic
closer: vasiljevic
closedate: 2003-11-09T20:32:35
comment:
  I would like to use the function "http://tcl.tk/man/tcl8.4/TclCmd/lset.htm" with thread shared variables.
  Do you know other functions that should or will be added later with TCL 8.5?


tkt_uuid: 2835615fffffffffffffffffffffffffffffffff
type: RFE
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Pool suspend/resume feature
cmimetype: text/plain
submitter: hathawa
assignee: vasiljevic
closer: vasiljevic
closedate: 2009-08-20T19:38:18
comment:
  I think it would be nice to be able to suspend the processing of jobs by threads. That way one could turn off (suspend) job processing after a pool is created, load up the job queue with post, and then resume processing so the threads could process the job queue.  I have found on slower machines with only 2 cores that thread processing interfere with post operations. A possible solution would be to implement a tpool::pending command with a suspend/resume option that would return the list of pending jobs.


tkt_uuid: 3383288fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
foundin: obsolete: 8.6b2
title: rules.vc missing support for MSVC10
cmimetype: text/plain
submitter: twylite
assignee: dgp
closer: dgp
closedate: 2011-08-01T14:39:20
comment:
  The rules.vc file has not been updated to support MSVC 2010.  Required patch is:

  Index: win/vc/rules.vc
  ===================================================================
  --- win/vc/rules.vc
  +++ win/vc/rules.vc
  @@ -187,11 +187,13 @@
   _VC_MANIFEST_EMBED_DLL=
   VCVER=0
   !if ![echo VCVERSION=_MSC_VER > vercl.x] \
       && ![cl -nologo -TC -P vercl.x $(ERRNULL)]
   !include vercl.i
  -!if $(VCVERSION) >= 1500
  +!if $(VCVERSION) >= 1600
  +VCVER=10
  +!elseif $(VCVERSION) >= 1500
   VCVER=9
   !elseif $(VCVERSION) >= 1400
   VCVER=8
   !elseif $(VCVERSION) >= 1300
   VCVER=7


tkt_uuid: 1462274fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 7 High
foundin: None
title: Out-of-date version number in Win32 VC makefiles
cmimetype: text/plain
submitter: andreas_kupries
assignee: vasiljevic
closer: hobbs
closedate: 2006-04-05T23:17:43
comment:
  ./win/vc/pkg.vc:PACKAGE_VERSION = "2.6",
  but the actual version is 2.6.3.

  This causes a mismatch between the "package ifneeded" /
  "package provided" statements used to declare and
  provide the package. 8.4 reports this on stderr, in 8.5
  this is a error.


tkt_uuid: 1578877fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: thread::release treats hanging processes wrongly
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T14:41:14
comment:
  If you run a process in a thread and try to kill it 
  with thread::release, then the thread ID will be 
  removed from the list even though it remains running, 
  e.g. if it is stuck in an infinite loop.


tkt_uuid: 3534607fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: obsolete: 8.5.11
title: tpool::get sets errorInfo incorrectly
cmimetype: text/plain
submitter: tomkiti
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2456883.87678124
comment:
  When tpool::get is called on a job that exited with an error, the first line of errorInfo is set incorrectly (the text is doubled).


tkt_uuid: 1689375fffffffffffffffffffffffffffffffff
type: Patch
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Update VC makefile for Threads (Fix for bug 1643367)
cmimetype: text/plain
submitter: twylite
assignee: vasiljevic
comment:
  The attached patch updates the makefile.vc and rules.vc to be in line with the sampleextension in CVS (plus the changes I have submitted in bug [ 1689286 ] nmakehlp not building on Win32 with VC).

  It also acts as a fix to bug [ 1643367 ].

  Tested with VC6 and VC8 on Windows 2000.  Builds, installs and runs correctly (including running all tests), so far as I can tell ;)

  There are a number of changes:
    - configure.in: note to change DOTVERSION in makefile.vc when you update the version
    - win/thread.rc: the sampleextension makefile.vc provides different variables/defines to rc
    - tests/thread.test: tcl_PatchLevel ==> tcl_patchLevel
    - win/makefile.vc, win/nmakehlp.c and win/rules.vc: added, based on sampleextension with minimal changes needed to make it work with threads extension

  The files win/vc/makefile.vc, win/vc/nmakehlp.c, win/vc/pkg.vc and win/vc/rules.vc are no longer required and should be deleted.  They have effectively been moved to win/ and replaced with updates based on
  sampleextension.  If these files stay in win/vc and get modified to be in a "non-standard" location, then we ensure this pain every time they need to be updated (otherwise we just copy from sampleextension).


tkt_uuid: 1516450fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Compiler warnings building on x86_64
cmimetype: text/plain
submitter: mic42
assignee: vasiljevic
closer: vasiljevic
closedate: 2006-08-06T10:40:28
comment:
  Building on a SUSE 10.1 against Tcl 8.5 (cvs) i get
  compiler warnings for some code:

  ./generic/threadSvCmd.c: In function
  ‘SvAllocateContainers’:
  ./generic/threadSvCmd.c:881: warning: cast from pointer
  to integer of different size
  ./generic/threadSvCmd.c:881: warning: cast from pointer
  to integer of different size

  dkf suggested this as a fix in the chat (and it
  silences the warning):
  static void
  SvAllocateContainers(bucketPtr)
      Bucket *bucketPtr;
  {
      Container tmp[2];
      size_t objSizePlusPadding =
  (size_t)(((char*)(tmp+1))-(char*)tmp);
      /* 
       size_t objSizePlusPadding =
  ((int)(&(tmp[1]))-(int)(&(tmp[0])));
      */

  ...


tkt_uuid: 3007426fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Build failure on AIX
cmimetype: text/plain
submitter: andreas_kupries
assignee: andreas_kupries
closer: andreas_kupries
closedate: 2010-05-26T20:11:32
comment:
  The AIX native cc, a strict c89 compiler, does not handle the trailing commas in enum declarations/definitions, and throws errors.
  Attaching a patch showing the problematic places, and a fix.


tkt_uuid: 1505810fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Wont Fix
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: init.tcl not found in thread interpreter
cmimetype: text/plain
submitter: cnassau
assignee: vasiljevic
closer: vasiljevic
closedate: 2006-09-06T13:49:00
comment:
  We are using the thread extension in combination with
  an application specific tcl_library path (in other
  words, in this installation *only* the tcl_library
  variable knows where to find a usable "init.tcl"). With
  thread-2.6.3, when we spawn a new thread using
  "thread::create" that new thread does not find the
  "init.tcl" and is thus slightly handicapped; we
  currently have to manually do the following to get a
  functional thread:

  thread::send $tid [list set tcl_library $tcl_library]
  thread::send $tid {
     source [file join $tcl_library init.tcl]
  } 

  This feels like a hack that better ought to be fixed in
  the thread package itself. 

  Inspecting the code one finds that threadCmd.c executes

      interp = Tcl_CreateInterp();
      result = Tcl_Init(interp);

  in NewThread(clientData). It seems that "result" is
  currently not used, so any failure at that stage
  remains unnoticed. I would suggest to always initialize
  the thread's tcl_library with the parent's tcl_library
  before calling Tcl_Init().


tkt_uuid: 599290ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: potential segfault in NewThread()
cmimetype: text/plain
submitter: msofer
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-08-23T18:03:14
comment:
  In NewThread() (threadCmd.c):
    line 1476 calls Tcl_Release on tsdPtr->interp
    line 1498 uses tsdPtr->interp

  But tsdPtr->interp could point to free memory after
  releasing it.


tkt_uuid: 1076117fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: cvs head thread package configure bugs
cmimetype: text/plain
submitter: lvirden
assignee: vasiljevic
closer: vasiljevic
closedate: 2004-12-18T13:47:03
comment:
  1. Thread package assumes that gdbm will be installed
  in one of only 4 places - $exec_prefix $prefix,
  /usr/local, or /usr .
  However, users have this package installed elsewhere as
  well.

  2. The code in configure has a bug when checking for
  existence of the library.  It is coded:

  for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
                  `ls -d ${prefix}/lib 2>/dev/null` \
                  `ls -d /usr/local/lib 2>/dev/null` \
                  `ls -d /usr/lib 2>/dev/null` ; do
              if test -f "$i/libgdbm*" ; then
                  libdir=`(cd $i; pwd)`
                  break
              fi
          done


  This, however, makes the assumption that there will
  never be more than one file in the directory which
  begins libgdbm.  If the user has more than one version
  installed, or the installation looks like:
  /projects/gnu/sparc-sun-solaris2.8/lib/libgdbm.so.3.0.0
  /projects/gnu/sparc-sun-solaris2.8/lib/libgdbm.so.3
  /projects/gnu/sparc-sun-solaris2.8/lib/libgdbm.so
  /projects/gnu/sparc-sun-solaris2.8/lib/libgdbm.la
  /projects/gnu/sparc-sun-solaris2.8/lib/libgdbm.a

  then the if fails to identify that the library exists
  in this directory (because there's a list used in a
  place where a single file name is  expected....)


tkt_uuid: 634845ffffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: thread::sync crashes on errors
cmimetype: text/plain
submitter: zoro2
assignee: vasiljevic
closer: vasiljevic
closedate: 2002-11-07T18:33:38
comment:
  I'm using my own tclkit with --enable-threads, built on
  MinGW on Windows. Thread package is compiled static.

  Tcl crashes, when I do the following:

  set id [threac::create]
  thread::send -async $id {expr 1+1a} somevar

  It works when I send it without -async flag (I get an
  error).

  Versions:
  Windows 2000 Pro SP1
  Tcl/Tk: 8.4.1, from CVS - 2002-10-29
  Thread extension: 2.4
  $ gcc --version
  2.95.3-6


tkt_uuid: 3591021fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: current: 8.6.0
title: compiler warning
cmimetype: text/plain
submitter: dgp
assignee: nijtmans
closer: nijtmans
closedate: 2012-11-29T13:50:20
comment:
  cc-1164 cc: WARNING File = /home/dgp/src/tcl8.6.0/pkgs/thread2.7.0/generic/threadSvCmd.c, Line = 1159
    Argument of type "ClientData" is incompatible with parameter of type
            "Tcl_CmdDeleteProc *".

        Tcl_CreateObjCommand(interp, buf, SvObjDispatchObjCmd, (int*)svObj, arg);
                                                                            ^


tkt_uuid: 3027815fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Accepted
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.8
title: Safe interpreters can use Thread to execute unsafe commands
cmimetype: text/plain
submitter: kjnash
assignee: vasiljevic
closer: vasiljevic
closedate: 2010-09-28T18:55:02
comment:
  A safe interpreter can load all the commands of the Thread package.  This is a security issue, because it means that a safe interpreter can create a new thread and send commands to that thread's unsafe master interpreter:

  % ::safe::interpCreate iSafe
  iSafe
  % iSafe eval pwd
  invalid command name "pwd"
  % iSafe eval {
      package require Thread
      set tid [thread::create]
      ::thread::send $tid {pwd}
  }
  /home/user
  %

  At present the safe entry point Thread_SafeInit gives a safe interpreter access to all the commands of the Thread extension.  For security reasons, at least some of these commands should be removed.

  Perhaps safe interpreters should not be allowed any access to Thread commands.  I am not familiar with the whole of the Thread package, but it appears that the natural scope of a thread operation is the master interpreter of the thread.  If a safe interpreter needs limited access to Thread commands, it might be best provided by wrapper commands aliased into the safe slave from its unsafe master - not by loading the Thread package itself.

  I suggest removing the safe entry point Thread_SafeInit completely.


tkt_uuid: 3567104fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.6b3
title: pkgIndex.tcl bronken when building with Makefile.vc
cmimetype: text/plain
submitter: oehhar
assignee: vasiljevic
closer: oehhar
closedate: 2012-09-13T10:28:48
comment:
  pkgIndex.tcl contains literal string "@TCL_VERSION@" when build with win/Makefile.vc.

  The patch is to add : @TCL_VERSION@ $(TCL_DOTVERSION) after line 440 of win/Makefile.vc


tkt_uuid: 3494470fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 3 Low
severity: Minor
foundin: obsolete: 8.5.10
title: called Tcl_FindHashEntry on deleted table
cmimetype: text/plain
submitter: rtreleaven
assignee: vasiljevic
closer: sebres
closedate: 2457190.97626593
comment:
  % puts $tcl_patchLevel
  8.5.10
  % parray tcl_platform
  tcl_platform(byteOrder)   = littleEndian
  tcl_platform(machine)     = x86_64
  tcl_platform(os)          = Linux
  tcl_platform(osVersion)   = 3.0.0-16-generic
  tcl_platform(platform)    = unix
  tcl_platform(pointerSize) = 8
  tcl_platform(threaded)    = 1
  tcl_platform(user)        = rtreleaven
  tcl_platform(wordSize)    = 8
  % 

  Problem Behavior
  The script below produces this output >90% but  <100% of the time.

  $ tclsh getHelp.tcl
  Does thread exist? no
  Does thread exist? no
  Does thread exist? no
  Does thread exist? no
  Does thread exist? no
  Does thread exist? no
  called Tcl_FindHashEntry on deleted table
  $ echo $?
  0

  Expected Behaviour
  The message "called Tcl_FindHashEntry on deleted table" should not be generated

  Concise Code Sample

  set truth(1) yes
  set truth(0) no
  package require Thread
  set id [ thread::id ]
  for { set i 0 } { $i < 6 } { incr i } {
  thread::create -preserved {
  while 1 {
  for { set i 0 } { $i < 9999999 } { incr i } {}
  update
  }
  }
  }
  after 1000
  foreach id [ thread::names ] {
  if { $id eq [ thread::id ] } { continue }
  thread::release -wait $id
  puts "Does thread exist? $truth([ thread::exists $id])"
  }


tkt_uuid: 1512225fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.4.13
title: tpool::wait and tpool::cancel set wrong value to variable
cmimetype: text/plain
submitter: nyademo
assignee: vasiljevic
closer: vasiljevic
closedate: 2007-06-30T15:31:16
comment:
  tpool::wait and tpool::cancel set wrong value to
  optional variable.


  Windows2000
  ActiveTcl8.4.13
  Thread2.6.3 compiled by VC6


  Sample code for tpool::wait
  -------------------------------------------------------
  set tp [tpool::create -maxworkers 1]
  for {set i 1} {$i < 10} {incr i} {
  puts [tpool::post -nowait $tp [subst {
  puts $i:start
  after 5000
  puts $i:end
  }]]
  }
  puts [tpool::wait $tp {4 5 6} waiting]:DONE
  if {[llength $waiting] != 2} {
  error "waiting is $waiting"
  }


  In this code, only one worker thread is worked.
  So posted jobs are eval one by one.
  When the 4 job is finishing, tpool::wait returns from 
  event loop, and returns number 4, 
  and should set a list of waiting jobs (5 and 6) 
  to "waiting" variable.
  But "waiting" variable is empty list.


  Sample code for tpool::wait
  -------------------------------------------------------
  set tp [tpool::create -maxworkers 1]
  for {set i 1} {$i < 10} {incr i} {
  puts [tpool::post -nowait $tp [subst {
  puts $i:start
  after 1000
  puts $i:end
  }]]
  }
  after 5000
  # jobs 1,2,3 was already done here
  tpool::cancel $tp {1 2 3} uncanceled
  if {$uncanceled ne {1 2 3}} {
  # may be $uncanceled is {1 1 1 2 2 2 3 3 3}
  error "uncanceled is $uncanceled"
  }


  In this code, only one worker thread is worked.
  So posted jobs are eval one by one.
  After The 1, 2 and 3 jobs are finished, tpool::cancel 
  is called. So 1,2,3 jobs can't be canceled.
  tpool::cancel returns empty list and should set a list
  of uncanceled jobs (1,2 and 3) to "uncanceled" variable.
  But "uncanceled" variable is {1 1 1 2 2 2 3 3 3} 
  in this case.


  There isn't a test, so I have no confidence 
  in detail of specifications... 
  But I try to make a pach. see also that.

  thanks.


tkt_uuid: 1478402fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: Wrong binary in Windows
cmimetype: text/plain
submitter: ctasada
assignee: vasiljevic
closer: hobbs
closedate: 2006-04-28T17:29:11
comment:
  I've just downloaded the Thread 2.6.3 package and I've
  found a strange problem.

  When I load the package (package require Thread 2.6.3)
  sais that the package is not available, but founds
  correctly Thread 2.6.

  Looking in the dll version I see that it's 2.6. I've
  downloaded the sources and recompiled them in Windows,
  with exactly the same beahiviour.

  Seems that the VC makefiles are unsync with the TEA
  makefiles.

  It's quite a simple fix.

  Or maybe I should forget about minor versions in the
  Windows platform?

  Cheers.


tkt_uuid: 2833864fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: obsolete: 8.5.7
title: tpool::create crashes on 64-bit Vista
cmimetype: text/plain
submitter: hathawa
assignee: vasiljevic
closer: vasiljevic
closedate: 2009-08-19T15:26:28
comment:
  The tpool::create command fails to return on 64-bit Vista. The failing statement is in threadPoolCmd.c at line 288:
      sprintf(buf, "%s%p", TPOOL_HNDLPREFIX, tpoolPtr);
  The issue is the size of buf is too small.  Increasing its size from 16 to 32 solves the problem.


tkt_uuid: 1095370fffffffffffffffffffffffffffffffff
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
foundin: None
title: tpool doesn't respect -minworkers
cmimetype: text/plain
submitter: nobody
assignee: vasiljevic
closer: vasiljevic
closedate: 2005-01-11T16:00:11
comment:
  -minworkers threads are started, but but if they
  are unused for -idletime, they are killed off.
  This is contrary to the documentation and
  to the "appropriate" behavior for this paradigm.


tkt_uuid: 4e30d60da7d105bd603350b74b6c99c3e28cb73e
type: Bug
status: Closed
resolution: Duplicate
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 2.7.0
private_contact: 54152f94cb1628c0c148b4b5708ace53216227b0
title: Error message is doubled in -errorinfo in rethrown exception using tpool::get
cmimetype: text/plain
submitter: anonymous
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2456883.87900735
comment:
  Using tpool, exceptions thrown from jobs in worker threads appear to have the error message duplicated in the first line of the -errorinfo trace in the options dict.  For example the script:

  package require Thread 2.7.0

  set pool    [tpool::create -initcmd {
      proc t {} {
          throw {HELLO WORLD} "test res"
      }
  }]

  tpool::preserve $pool

  set job_id  [tpool::post $pool t]
  tpool::wait $pool $job_id
  catch {tpool::get $pool $job_id} res options
  puts [dict get $options -errorinfo]

  tpool::release $pool


  Produces the output:

  test restest res
      while executing
  "throw {HELLO WORLD} "test res""
      (procedure "t" line 2)
      invoked from within
  "t"
      invoked from within
  "tpool::get $pool $job_id"


  Tcl version: 8.6.1
  Platform: linux-glibc2.19-x86_64 (Ubuntu 14.04 64bit)


tkt_uuid: 41922d3bb7c43da1c6e0cf36c3b4b5ccbb89b564
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: current
private_contact: 36034badbf4fa68e1e6f55bc81729916152660a8
title: Please regenerate the docs.
cmimetype: text/plain
submitter: stwo
assignee: nobody
closer: gahr
closedate: 2457498.88450706
comment:
  Newer versions of doctools make better docs, don't have bugs in nroff format.
  '.TH' should come before the macros in .n files.
  See Tcl ticket [426679ef7d].


tkt_uuid: 9ab808b6639182736ac3b7493a54726b69c2730d
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 9 Immediate
severity: Critical
foundin: 2.7.1
private_contact: 219192cc5b7de6cef9c96726d1feb29d0382f2dc
title: Segmentation fault on ::tsv::names
cmimetype: text/plain
submitter: anonymous
assignee: jan.nijtmans
closer: anonymous
closedate: 2456987.27590007
comment:
  The following script exits due to a segmentation fault with Tcl 8.6.3 and Thread 2.7.1. This did not happen with Thread 2.7.0.

  ~~~
  package require Thread;
  ::tsv::set x k v;
  ::tsv::names;
  ~~~


tkt_uuid: a57b6c3fd438ec070faf8ec2524cebdd079d6245
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.7.2
private_contact: 3ef14697778ca2a56971c6d482b162d2741adf8c
title: -eventmark + thread::send -async == deadlock
cmimetype: text/x-fossil-wiki
submitter: pooryorick
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2457295.98150748
comment:
  <code>thread::configure $threadid -eventmark</code> ... limits the number of asynchronous calls to the thread. If thread <i>A</i> and thread <i>B</i> are configured with an <code>-eventmark</code>, and <i>A</i> uses the variant of <code>thread::send -async</code> that specifies a variable in which to store the result of the call, a deadlock can occcur if <i>A</i>'s -eventmark limit is reached in the meantime. Apparently, the response from <i>B</i> to <i>A</i> that stores the result in the specified variable is subject to the queue limit of <i>A</i>. Because asynchronous calls become blocking when a thread's queue limit is reached, A ends up blocked in an <code>-async</code> call to <i>B</i>, which in turn is blocked waiting for <i>A</i>'s queue to die down so that it can write its response.

  I think this is a bug because with <code>-eventmark</code>, the intent is
  normally to throttle incoming calls, not to limit responses to calls to
  other threads, and it can be a real head-scratcher when such a deadlock occurs
  in a non-trivial threaded program.  Even when one is aware of this behaviour,
  in many cases it significantly diminishes the utility of
  <code>-eventmark</code> and complicates the design of threaded programs.

  Here's a script that illustrates the issue:

  <code><verbatim>
  #! /bin/env tclsh

  package require Thread

  set consumer [thread::create {
      proc eat value {
          puts [list [thread::id] receive $value]
      }
      thread::wait
  }]
  thread::configure $consumer -eventmark 10 

  set filter [thread::create {
      proc eat value {
          variable consumer
                  
                  # This command causes the threads to hang.
          thread::send -async $consumer [list eat [expr {$value * 2}]] [namespace current]::reply

                  # Replace the previous command with this one, and the deadlock resolves.
          #thread::send -async $consumer [list eat [expr {$value * 2}]] 
      }
      thread::wait
  }]
  thread::send $filter [list variable consumer $consumer]
  thread::configure $filter -eventmark 10 

  for {set i 0} {$i < 50} {incr i} {
      set thread [thread::create {
          proc go {} {
              variable filter
              set value 1
              while 1 {
                  incr value 2
                  #puts [list sending $value to $filter]
                  thread::send -async $filter [list eat $value]
              }
          }
          thread::wait
      }]
      thread::send -async $thread [list variable filter $filter]
      thread::send -async $thread {after 0 [list after idle go]}
  }

  vwait forever
  </verbatim></code>

  One fix would be to exclude <code>-async</code> callbacks from the queue limit:


  <code><verbatim>
  --- generic/threadCmd.c
  +++ generic/threadCmd.c
  @@ -265,10 +265,11 @@
    * Definition of flags for ThreadSend.
    */

   #define THREAD_SEND_WAIT 1<<1
   #define THREAD_SEND_HEAD 1<<2
  +#define THREAD_SEND_CLBK 1<<4

   #ifdef BUILD_thread
   # undef  TCL_STORAGE_CLASS
   # define TCL_STORAGE_CLASS DLLEXPORT
   #endif
  @@ -2745,15 +2746,17 @@
       Tcl_ThreadAlert(thrId);

       if ((flags & THREAD_SEND_WAIT) == 0) {
           /*
            * Might potentially spend some time here, until the
  -         * worker thread clean's up it's queue a little bit.
  +         * worker thread cleans up its queue a little bit.
            */
  -        while (tsdPtr->maxEventsCount &&
  -               tsdPtr->eventsPending > tsdPtr->maxEventsCount) {
  -            Tcl_ConditionWait(&tsdPtr->doOneEvent, &threadMutex, NULL);
  +        if ((flags & THREAD_SEND_CLBK) == 0) {
  +            while (tsdPtr->maxEventsCount &&
  +                   tsdPtr->eventsPending > tsdPtr->maxEventsCount) {
  +                Tcl_ConditionWait(&tsdPtr->doOneEvent, &threadMutex, NULL);
  +            }
           }
           Tcl_MutexUnlock(&threadMutex);
           return TCL_OK;
       }

  @@ -3094,11 +3097,11 @@
       if (interp != NULL) {
           Tcl_Preserve((ClientData)interp);

           if (clbkPtr && clbkPtr->threadId == thrId) {
               Tcl_Release((ClientData)interp);
  -            /* Watch: this thread evaluates it's own callback. */
  +            /* Watch: this thread evaluates its own callback. */
               interp = clbkPtr->interp;
               Tcl_Preserve((ClientData)interp);
           }

           Tcl_ResetResult(interp);
  @@ -3157,11 +3160,11 @@
           if (code != TCL_OK) {
               ThreadErrorProc(interp);
           }

           ThreadSetResult(interp, code, &clbkPtr->result);
  -        ThreadSend(interp, clbkPtr->threadId, tmpPtr, NULL, 0);
  +        ThreadSend(interp, clbkPtr->threadId, tmpPtr, NULL, THREAD_SEND_CLBK);

       } else if (code != TCL_OK) {
           /*
            * Only pass errors onto the registered error handler
            * when we don't have a result target for this event.
  </verbatim></code>


  See also http://wiki.tcl.tk/41344


tkt_uuid: c9d81a5d49fbbe921eb394561fc112ce0ddf251e
type: Patch
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 3 Low
severity: Minor
foundin: current
private_contact: 36034badbf4fa68e1e6f55bc81729916152660a8
title: Patch for 'discards qualifiers from pointer target type' compiler warning
cmimetype: text/plain
submitter: stwo
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2457407.45400987
comment:
  --- generic/threadSvListCmd.c.orig	Thu May 21 21:08:12 2015
  +++ generic/threadSvListCmd.c	Thu May 21 21:10:42 2015
  @@ -846,7 +846,7 @@ SvLsetObjCmd (arg, interp, objc, objv)
       lPtr = svObj->tclObj;
       argc = objc - off - 1;
   
  -    if (!SvLsetFlat(interp, lPtr, argc, (Tcl_Obj**)(objv+off),objv[objc-1])) {
  +    if (!SvLsetFlat(interp, lPtr, argc, (Tcl_Obj**)objv+off,objv[objc-1])) {
           return TCL_ERROR;
       }


tkt_uuid: 78a870b0d1ce3edf04ba8e3efd8f3761827f9420
type: Bug
status: Closed
resolution: Remind
subsystem: 17. Commands I-L
priority: 5 Medium
severity: Severe
foundin: 2.7 and current trunk (possible any)
title: tsv::lappend - extreme growth of execution time (not linear, dependent on list size)
cmimetype: text/plain
submitter: sebres
assignee: sebres
closer: sebres
closedate: 2457190.25842421
comment:
  By testing of FIFO over tsv (tsv::lappend / tsv::lpop}, I have found that tsv::lappend is very very slow on "large" lists (time grows not linear). As temporary workaround we can use "tsv::linsert ... end ..." instead.

  Example:
  % set i 0; tsv::set queue t1 {}; time {tsv::lappend queue t1 [incr i]} 5000
  213.3358 microseconds per iteration
  % set i 0; tsv::set queue t2 {}; time {tsv::linsert queue t2 end [incr i]} 5000
  1.0558 microseconds per iteration
  % expr {[tsv::get queue t1] eq [tsv::get queue t2]}
  1

  For 100000 iterations it runs extreme long...
  String representation (or wrong "canonical" flag)? List copy ("invalid" refCount etc.)? 

  BTW tsv::lpop and tsv::lpush are fast enough (but tsv::lpush will be used for LIFO only).


tkt_uuid: f8ff429a39761534b232752a4348eb3ece5f4f6c
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 2.7.3
private_contact: 438e59f1f1c891b29d2528ed82d1e629cecc6336
title: Configure flag --without-gdbm not handled properly
cmimetype: text/plain
submitter: gahr
assignee: nobody
closer: gahr
closedate: 2457498.86980811
comment:
  The following patch to aclocal.m4 allows to use --without-gdbm in addition to --with-gdbm=no


  --- aclocal.m4
  +++ aclocal.m4
  @@ -20,11 +20,11 @@
   AC_DEFUN(TCLTHREAD_WITH_GDBM, [
       AC_ARG_WITH(gdbm,
          [  --with-gdbm             link with optional GDBM support],\
          with_gdbm=${withval})

  -    if test x"${with_gdbm}" != x; then
  +    if test x"${with_gdbm}" != "x" -a "${with_gdbm}" != no; then

       AC_MSG_CHECKING([for GNU gdbm library])

       AC_CACHE_VAL(ac_cv_c_gdbm,[
       if test x"${with_gdbm}" != x -a "${with_gdbm}" != "yes"; then


tkt_uuid: be135da5f91179a298a979d9eed103a5db02013c
type: Patch
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.7.3
private_contact: 438e59f1f1c891b29d2528ed82d1e629cecc6336
title: Document side-effect of [tsv::array unbind]
cmimetype: text/html
submitter: gahr
assignee: nobody
closer: gahr
closedate: 2457498.87140081
comment:
  I was surprised by the fact that calling [tsv::array unbind] is the only effective way to have data persisted. If the array is destroyed while bounded, its contents are removed from persistent storage as well. In my opinion a note in the tsv documentation section is needed. Here's my attempt at providing some clarification (I'm not an excellent writer...).

  <pre>
  --- doc/tsv.man
  +++ doc/tsv.man
  @@ -223,11 +223,14 @@
   The format of the [arg handle] is <handler>:<address>. For the built-in
   GNU Gdbm persistence layer, the format of the handle is "gdbm:<path>"
   where <path> is the path to the Gdbm database file.

   [call [cmd {tsv::array unbind}] [arg varname]]
  -Unbinds the shared [arg array] from its bound persistent storage.
  +Unbinds the shared array [arg varname] from its bound persistent storage. Note
  +that destroying a bound array causes its value to be deleted from persistent
  +storage as well, so calling [cmd {tsv::array unbind}] is mandatory if data
  +needs to be persisted.

   [call [cmd {tsv::array isbound}] [arg varname]]
   Returns true (1) if the shared [arg varname] is bound to some 
   persistent storage or zero (0) if not.

  </pre>

  Another possibility would be to unbind the array if it is implicitly destroyed when the thread exits, but this would change the existing behavior people might be relying on.


tkt_uuid: 84be1b5a73e57faf8b212e32dd275081c1ec0512
type: Bug
status: Closed
resolution: None
subsystem: 49. Threading
priority: 5 Medium
severity: Minor
foundin: trunk
private_contact: cb02a4a25e8da92f2790bc307bf01ef24ce6053e
title: segfault with -async and result trace
cmimetype: text/plain
submitter: anonymous
assignee: nobody
closer: gahr
closedate: 2457525.92498192
comment:
  rkeene stumbled across this segfault:

      package require Thread

      set t [thread::create]

      set resultvar() {}

      trace add variable resultvar() write {
          unset -nocomplain resultvar()
          puts unset
          list }

      thread::send -async $t {
          error "oh no"
      } resultvar()

      vwait forever

  What seems to be going on is ThreadClbkSetVar is a bit loose with refcounts on the error path.
  http://wiki.tcl.tk/14880 links to past discussion that is related.

  The following patch fixes it on trunk [b76b97e8909] and doesn't generate any test failures.


  --- generic/threadCmd.c
  +++ generic/threadCmd.c
  @@ -1637,18 +1637,21 @@
        * Get the result of the posted command.
        * We will use it to fill-in the result variable.
        */
   
       valObj = Tcl_NewStringObj(resultPtr->result, -1);
  +
       if (resultPtr->result != threadEmptyResult) {
           ckfree(resultPtr->result);
       }
   
       /*
        * Set the result variable
        */
  -
  +    if (resultPtr->code == TCL_ERROR) {
  +        Tcl_IncrRefCount(valObj);
  +    }
       if (Tcl_SetVar2Ex(interp, var, NULL, valObj,
                         TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG) == NULL) {
           return TCL_ERROR;
       }
   
  @@ -1666,10 +1669,11 @@
               var = "errorInfo";
               Tcl_SetVar2Ex(interp, var, NULL, Tcl_NewStringObj(resultPtr->errorInfo, -1), TCL_GLOBAL_ONLY);
               ckfree((char*)resultPtr->errorInfo);
           }
           Tcl_SetObjResult(interp, valObj);
  +        Tcl_DecrRefCount(valObj);
           Tcl_BackgroundError(interp);
       }
   
       return TCL_OK;
   }


tkt_uuid: a135697d8cea09bcbdda194e84ba1eeddff1df43
type: Patch
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.7.3
private_contact: 438e59f1f1c891b29d2528ed82d1e629cecc6336
title: Avoid double query to persistent storage in tsv::array bind
cmimetype: text/plain
submitter: gahr
assignee: nobody
closer: gahr
closedate: 2457498.91731005
comment:
  [tsv::array bind] works by looping over all key/value pairs in the persistent storage by calling  psFirst and then repeatedly psNext. At each iteration, the value is discarded and AcquireContainer is called. This, in turn, goes down to the persistent storage and locates the value of the key returned by psFirst/psNext using psGet. This is a waste of time (lookup in the persistent storage) and resources (value returned by psFirst/psLast is discarded and free'd).

  This patch allows to use the values returned by psFirst/psLast directly.


tkt_uuid: 9378bb6795e6ab5db05cce22e48a41e012806f3f
type: Patch
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 2.7.3
private_contact: 438e59f1f1c891b29d2528ed82d1e629cecc6336
title: Add support for LMDB persistent storage
cmimetype: text/plain
submitter: gahr
assignee: nobody
closer: gahr
closedate: 2457522.00317869
comment:
  This ticket is to track my work on adding support for using LMDB [http://symas.com/mdb/] for persistent storage. Work will be done in the [lmdb] branch.


tkt_uuid: 72b8ee4c76fb5e2473f49ad7b26bc59dbc159740
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: trunk
title: tsn-lmdb tests fail
cmimetype: text/plain
submitter: dgp
assignee: nobody
closer: gahr
closedate: 2457543.21484088
comment:
  Testing the trunk of Thread I see:

  ==== tsv-gdbm-1.0 tsv::array isboud FAILED
  ==== Contents of test case:

          tsv::array isbound a
      
  ---- Test setup failed:
  can't open persistent storage on "gdbm:data"
  ---- errorInfo(setup): can't open persistent storage on "gdbm:data"
      while executing
  "tsv::array bind a $::handle"
      (procedure "setup" line 2)
      invoked from within
  "setup"
      ("uplevel" body line 2)
      invoked from within
  "uplevel 1 $setup"
  ---- errorCode(setup): NONE
  ---- Test cleanup failed:
  shared variable is not bound
  ---- errorInfo(cleanup): shared variable is not bound
      while executing
  "tsv::array unbind a"
      (procedure "cleanup" line 2)
      invoked from within
  "cleanup"
      ("uplevel" body line 2)
      invoked from within
  "uplevel 1 $cleanup"
  ---- errorCode(cleanup): NONE
  ==== tsv-gdbm-1.0 FAILED

  and then 15 more failures much like this.

  I suspect this is just a matter of determining
  the pre-reqs for the tests, and using test
  constraints to disable them on systems where
  the pre-reqs are not satisfied.


tkt_uuid: b35544d2c8785226e7f3dfcf82dc43f3b7493a9e
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: trunk
title: Update version(s) in docs
cmimetype: text/plain
submitter: dgp
assignee: gahr
closer: dgp
closedate: 2457543.20988596
comment:
  Since the trunk is now attempting to be Thread 2.8.0
  a pass through the docs is needed to make sure they
  are all claiming to document 2.8 and not 2.7.


tkt_uuid: 4a8a7fbb1ff6302d3ae649c197d652f98e03b9cd
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Severe
foundin: all
private_contact: 45acae529cab3ab98979b4963483a82f50bb42e5
title: Thread package fails to consider the interp it was initially loaded from was deleted
cmimetype: text/plain
submitter: dgp
assignee: gahr
closer: nobody
comment:
  Copied from http://core.tcl.tk/tcl/tktview/518f1f22be

  The thread package commands call a function named Init and passes along the caller's interpreter. Init caches the interp in thread local storage if it hasn't been set yet and uses it for all future invocations. If the interp is later deleted this will lead to an error ("attempt to call eval in deleted interpreter") when communicating with its parent thread via commands like thread::send.  

  There is a demo of this here: http://paste.tclhelp.net/?id=idf
  If this is a Won't Fix I propose the docs be updated to warn against deleting the calling interp to save someone else some pain.

  Correcting the behavior seems trivial and shouldn't have any noticable performance impact. The function shown below seems to solve the problem:

  static void
  Init(interp)
      Tcl_Interp *interp;         /* Current interpreter. */
  {
      ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);

      if (tsdPtr->interp == (Tcl_Interp*)NULL) {
          memset(tsdPtr, 0, sizeof(ThreadSpecificData));
          tsdPtr->interp = interp;
          ListUpdate(tsdPtr);
          Tcl_CreateThreadExitHandler(ThreadExitProc,
                                      (ClientData)threadEmptyResult);
      } else if (Tcl_InterpDeleted(tsdPtr->interp)) {
          tsdPtr->interp = interp;
      }
  }


tkt_uuid: 314e2105066ab15de719c1b09aad2e61abd0cf40
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Severe
foundin: 2.8.0
private_contact: 54152f94cb1628c0c148b4b5708ace53216227b0
title: Deadlock in tpool
cmimetype: text/plain
submitter: anonymous
assignee: nobody
closer: nobody
comment:
  Tcl version: 8.6.6
  Platform: linux-glibc2.23-x86_64 (Ubuntu 16.04.1 64bit)

  The script below (which should be cpu bound) sometimes runs cleanly to completion (in about 0.3 seconds on my laptop) but most of the time is delayed by an exact multiple of the -idletime argument of the thread pool.  If no -idletime is configured the script deadlocks forever instead of delaying.  The same behaviour was also observed on Tcl 8.6.4 with Thread 2.7.1 on Ubuntu 14.04.5 64bit.

  While the script is delayed the cpu is idle.

  The issue doesn't seem to be especially sensitive to the thread counts used or number of calls to the thread pool, and is also seen in NaviServer when starting client threads with [ns_schedule_proc -once -thread 0] instead of [thread::create], and waiting on results with vwait instead of thread::wait in the main script.

  # -------------------------------------------------------------
  set script_start [clock microseconds]
  set clients 5
  set client_threads {}
  set results {}

  puts "pid: [pid]"
  puts "Have Tcl [info patchlevel]"
  puts "Have Thread [package require Thread]"

  proc log msg {
  	global script_start
  	puts [format {%10.6f %-19s %s} [expr {([clock microseconds]-$script_start)/1e6}] [thread::id] $msg]
  }

  set pool [tpool::create -minworkers 1 -maxworkers 4 -idletime 10 -initcmd {
  	puts "Init tpool worker [thread::id]"
  	proc stress_req_worker {} {}
  } -exitcmd {
  	puts "tpool worker [thread::id] exiting"
  }]
  tpool::preserve $pool

  proc client_ready tid {
  	global client_threads clients
  	lappend client_threads $tid
  	log "client_ready: $tid ([llength $client_threads])"
  	if {[llength $client_threads] == $clients} start_clients
  }

  proc start_clients {} {
  	global client_threads start
  	log "all clients ready, starting"
  	set start		[clock microseconds]
  	foreach tid $client_threads {
  		thread::send -async $tid start
  	}
  }

  proc client_done tid {
  	global results clients
  	log "client done: $tid"
  	lappend results $tid
  	thread::release $tid
  	if {[llength $results] == $clients} {thread::release [thread::id]}
  }

  set job	[string map [list \
  	%script_start%  [list $script_start] \
  	%main_tid%      [list [thread::id]] \
  	%pool%          [list $pool] \
  ] {
  	proc log msg {
  		puts [format {%10.6f %-19s %s} [expr {([clock microseconds]-%script_start%)/1e6}] [thread::id] $msg]
  	}

  	proc stress_req {} {
  		set pool	%pool%
  		#set job_id [tpool::post -nowait $pool stress_req_worker]
  		set job_id [tpool::post $pool stress_req_worker]
  		tpool::wait $pool [list $job_id]
  		tpool::get $pool $job_id
  	}

  	proc start {} {
  		for {set i 0} {$i < 5000} {incr i} stress_req
  		thread::send -async %main_tid% [list client_done [thread::id]]
  	}

  	proc ping {} {
  		log ping
  		after 1000 ping
  	}
  	after 1000 ping

  	thread::send -async %main_tid% [list client_ready [thread::id]]
  	thread::wait
  	log "terminating"
  }]

  for {set i 0} {$i < $clients} {incr i} {
  	log "started client thread: [thread::create -preserved $job]"
  }

  thread::wait

  log "Took [format %.6f [expr {([clock microseconds]-$start)/1e6}]] seconds"

  tpool::release $pool
  # -------------------------------------------------------------

  Output from a failed run:
  pid: 24667
  Have Tcl 8.6.6
  Have Thread 2.8.0
  Init tpool worker tid0x7fa76d008700
    0.007603 tid0x7fa76efee700   started client thread: tid0x7fa76c807700
    0.009951 tid0x7fa76efee700   started client thread: tid0x7fa7677fe700
    0.011338 tid0x7fa76efee700   started client thread: tid0x7fa766ffd700
    0.012999 tid0x7fa76efee700   started client thread: tid0x7fa7667fc700
    0.014608 tid0x7fa76efee700   started client thread: tid0x7fa765ffb700
    0.014682 tid0x7fa76efee700   client_ready: tid0x7fa76c807700 (1)
    0.014700 tid0x7fa76efee700   client_ready: tid0x7fa7677fe700 (2)
    0.014709 tid0x7fa76efee700   client_ready: tid0x7fa766ffd700 (3)
    0.014718 tid0x7fa76efee700   client_ready: tid0x7fa7667fc700 (4)
    0.014726 tid0x7fa76efee700   client_ready: tid0x7fa765ffb700 (5)
    0.014752 tid0x7fa76efee700   all clients ready, starting
  Init tpool worker tid0x7fa7657fa700
  Init tpool worker tid0x7fa764ff9700
  Init tpool worker tid0x7fa74bfff700
    0.298887 tid0x7fa76efee700   client done: tid0x7fa7677fe700
    0.299179 tid0x7fa7677fe700   terminating
    0.301427 tid0x7fa76efee700   client done: tid0x7fa76c807700
    0.301582 tid0x7fa76c807700   terminating
    0.305801 tid0x7fa76efee700   client done: tid0x7fa7667fc700
    0.306065 tid0x7fa7667fc700   terminating
    1.011609 tid0x7fa766ffd700   ping
    1.014875 tid0x7fa765ffb700   ping
    2.011739 tid0x7fa766ffd700   ping
    2.015033 tid0x7fa765ffb700   ping
    3.011859 tid0x7fa766ffd700   ping
    3.015184 tid0x7fa765ffb700   ping
    4.012008 tid0x7fa766ffd700   ping
    4.015335 tid0x7fa765ffb700   ping
    5.012190 tid0x7fa766ffd700   ping
    5.015532 tid0x7fa765ffb700   ping
    6.012298 tid0x7fa766ffd700   ping
    6.015691 tid0x7fa765ffb700   ping
    7.012437 tid0x7fa766ffd700   ping
    7.015819 tid0x7fa765ffb700   ping
    8.012601 tid0x7fa766ffd700   ping
    8.016068 tid0x7fa765ffb700   ping
    9.012737 tid0x7fa766ffd700   ping
    9.016252 tid0x7fa765ffb700   ping
   10.012888 tid0x7fa766ffd700   ping
   10.016466 tid0x7fa765ffb700   ping
  tpool worker tid0x7fa7657fa700 exiting
  tpool worker tid0x7fa764ff9700 exiting
  tpool worker tid0x7fa76d008700 exiting
  Init tpool worker tid0x7fa76d008700
   10.308713 tid0x7fa76efee700   client done: tid0x7fa766ffd700
   10.308743 tid0x7fa766ffd700   terminating
   10.308862 tid0x7fa76efee700   client done: tid0x7fa765ffb700
   10.308889 tid0x7fa765ffb700   terminating
   10.308906 tid0x7fa76efee700   Took 10.294139 seconds
  tpool worker tid0x7fa74bfff700 exiting
  tpool worker tid0x7fa76d008700 exiting


tkt_uuid: 414d74e9178ddc353243613621ac75d87be46396
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
private_contact: 69bcf8f20a3ff98aebae1ac1f67da122cc58f3a3
title: Provide a way to see how many asynchronously posted scripts are pending on the thread event loop
cmimetype: text/plain
submitter: karl
assignee: nobody
closer: nobody
comment:
  thread::configure -eventmark is a way to limit the number of asynchronously posted scripts can be queued to a thread event loop, but relying on it easily leads to deadlocks.

  Sending scripts asynchronously to a thread without limiting pending events using -eventmark can result in huge numbers of events being posted, posted more frequently than they are being processed, leading to unconstrained memory growth and events never getting handled.

  It would be really nice if there was a way to find out how many events are pending on a thread.  If I could do that, I could detect that I had a large number on there and then pause the generation of events to the thread without risking a deadlock.

  This could be done as a new option to thread::configure, like -pending or something, or a new command like thread::pending or something like that.


tkt_uuid: d9c95d3ed3f9c67dae738c7dd062fa9a7a6b8cb7
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 8.6.6
private_contact: f0e2312a244c99b69b66ff52a743015292c5af63
title: tpool::post -nowait does not ever create more than 1 worker thread
cmimetype: text/plain
submitter: bovine
assignee: nobody
closer: nobody
comment:
  If you use tpool::post -nowait against a tpool that was created with -minworkers that is less than -maxworkers, the full number of threads will never get created.

  In the extreme case of -minworkers 0, then only 1 thread will ever get created.

  tpool::post -nowait should create an additional thread (up to the -maxworkers limit) if there are no available idle threads, otherwise queue the work.


tkt_uuid: 646509f34f5e258709009f46ba26206969154f7f
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 8.6.6
private_contact: f0e2312a244c99b69b66ff52a743015292c5af63
title: tpool::release/post can hang if thread::exit is used
cmimetype: text/plain
submitter: bovine
assignee: nobody
closer: nobody
comment:
  If a thread worker ever happens to run code that calls thread::exit, then tpool is unable to properly notice the loss of a worker and will hang if you use tpool::post or tpool::release

  Admittedly, using thread::exit within a tpool is not a normal or recommended activity, but maybe this should be handled and detected better.


tkt_uuid: 63c86edf71cff8a7cc886013b8e76f105e1a8166
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Critical
foundin: 2.7.2
private_contact: f0e2312a244c99b69b66ff52a743015292c5af63
title: segfault in argument parsing of tpool::post
cmimetype: text/plain
submitter: bovine
assignee: gahr
closer: gahr
closedate: 2457707.24566505
comment:
  The tpool::post command has argument parsing that assumes that there will always be enough arguments left after options have been parsed, which can cause a segfault if the options are repeated.

  tclsh8.6 [~/]package require Thread
  2.7.2

  tclsh8.6 [~/]tpool::post -detached -detached -detached -detached
  Segmentation fault (core dumped)


tkt_uuid: e3061ac9b6f11d4e8520cea7d87674db09a9e7bc
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
private_contact: f0e2312a244c99b69b66ff52a743015292c5af63
title: Provide a way to wait for all queued jobs to finish
cmimetype: text/plain
submitter: bovine
assignee: nobody
closer: nobody
comment:
  If multiple jobs have been queued using tpool::post -nowait -detached, it would be desirable to have a way to wait until all queued jobs had completed, such as before a program exits.

  tpool::release will pause queued jobs from starting and wait until all currently running jobs finish, but not necessarily wait for any other jobs that are still queued but haven't started running yet.

  tpool::wait requires you to have been keeping track of all individual jobids by not using -detached.

  Perhaps add a "tpool::wait -all" option that does not require a list of specific jobids to be specified and causes it to wait until all jobs have finished and not just any job?


tkt_uuid: b83d31c49a5580c8d9ef2aef08cf8cb03abd453b
type: Bug
status: Deleted
resolution: Invalid
subsystem: 80. Thread Package
priority: 5 Medium
severity: Critical
foundin: Tcl 8.6.4, Thread 2.8.0
private_contact: 8aeeb7bf106b6b88d87c6e2a0fdc8f4887991b9f
title: file exists, mtime... procedures leaks in threads
cmimetype: text/plain
submitter: RP.
assignee: nobody
closer: RP.
closedate: 2457716.82133725
comment:
  'file exists', 'file mtime' etc. commands leaks when argument is passed as result of 'file join' command. Similar to bug from Tcl core: http://core.tcl.tk/tcl/tktview/f00009f7ce4b58c8b6ca

  Example code that leaks:
  package require Thread
  thread::create {time {file exists [file join C:/ example.txt]} 100000}


tkt_uuid: 44499074cb431338a001c9d381913ffca29961d3
type: Bug
status: Closed
resolution: Rejected
subsystem: 80. Thread Package
priority: 5 Medium
severity: Critical
foundin: 2.8.1
private_contact: 55805032f00760ddf84eb3f8acb077da7bef1411
title: SIGSEGV under heavy load
cmimetype: text/plain
submitter: tombert
assignee: nobody
closer: tombert
closedate: 2457921.33718853
comment:
  Ubuntu 14, Tcl/Tk 8.6.6; Running in wish
  16 threads concurrently accessing TSVs. Not consistently crashing, but after some period of time.
  Here it seems related to the TSV:


  Sv_DuplicateObj (objPtr=0xefb5ef0030) at ./generic/threadSvCmd.c:989
  989	    if (objPtr->typePtr != NULL) {

  #0  Sv_DuplicateObj (objPtr=0xefb5ef0030) at ./generic/threadSvCmd.c:989
  #1  0x00007ffff410bf08 in DupListObjShared (srcPtr=0x1048ae0, copyPtr=0x7fffe9175110) at ./generic/threadSvListCmd.c:903
  #2  0x00007ffff4101318 in Sv_DuplicateObj (objPtr=0x1048ae0) at ./generic/threadSvCmd.c:1015
  #3  0x00007ffff4102ad9 in SvGetObjCmd (arg=0x0, interp=0x7fffb54feb40, objc=3, objv=0x7fffb550d640)
      at ./generic/threadSvCmd.c:1582
  #4  0x00007ffff76306a6 in Dispatch (data=0x7fffc163b398, interp=0x7fffb54feb40, result=0)
      at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:4358
  #5  0x00007ffff7630734 in TclNRRunCallbacks (interp=0x7fffb54feb40, result=0, rootPtr=0x7fffed1226d0)
      at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:4391
  #6  0x00007ffff762fec6 in Tcl_EvalObjv (interp=0x7fffb54feb40, objc=4, objv=0x7fffb550d2a0, flags=2097168)
      at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:4121
  #7  0x00007ffff763271e in TclEvalEx (interp=0x7fffb54feb40, 
      script=0x7fffcd76e3b0 "\n        ## create a sorted list of thread priorities\n        set sortedTids {}\n        foreach tid [tsv::get objlockTidQueue global] {\n", ' ' <repeats 12 times>, "lappend sortedTids [tsv::get objlockTidPrio $tid] $t"..., 
      numBytes=1195, flags=262144, line=9, clNextOuter=0x0, 
      outerScript=0x7fffcd76e3b0 "\n        ## create a sorted list of thread priorities\n        set sortedTids {}\n        foreach tid [tsv::get objlockTidQueue global] {\n", ' ' <repeats 12 times>, "lappend sortedTids [tsv::get objlockTidPrio $tid] $t"...) at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:5260
  #8  0x00007ffff76319d2 in Tcl_EvalEx (interp=0x7fffb54feb40, 
      script=0x7fffcd76e3b0 "\n        ## create a sorted list of thread priorities\n        set sortedTids {}\n        foreach tid [tsv::get objlockTidQueue global] {\n", ' ' <repeats 12 times>, "lappend sortedTids [tsv::get objlockTidPrio $tid] $t"..., 
      numBytes=1195, flags=262144) at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:4925
  #9  0x00007ffff7633832 in TclNREvalObjEx (interp=0x7fffb54feb40, objPtr=0x7fffcd779730, flags=262144, invoker=0x0, word=0)
      at /home/tombert/cm/tcltk86/dcompile/tcl/generic/tclBasic.c:6121


tkt_uuid: 1e3409bf1c6d0c1a64a0bfc59d0e4d8ec405cc5c
type: Bug
status: Closed
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 8.6.6
title: SIGSEGV or endless loop in tkTextDisp.c - cyclic references in dlPtr->nextPtr
cmimetype: text/plain
submitter: tombert
assignee: nobody
closer: tombert
closedate: 2457905.30661969
comment:
  While struggling and trying to reproduce this here:
  https://core.tcl.tk/thread/tktview/44499074cb431338a001c9d381913ffca29961d3
  I fall into that here:

  Can you explain that I ended up in an endless loop here?
  File tkTextDisp.c, Line 4203:

  (gdb) 
  4189	    for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) {
  (gdb) 
  4213		if ((dlPtr->flags & OLD_Y_INVALID)
  (gdb) 
  4214			|| (dlPtr->y == dlPtr->oldY)
  (gdb) 
  4215			|| (((dlPtr->oldY + dlPtr->height) > dInfoPtr->maxY)
  (gdb) 
  4217			|| ((dlPtr->oldY < dInfoPtr->y) && (dlPtr->y > dlPtr->oldY))) {
  (gdb) 
  4218		    continue;
  (gdb) 
  4189	    for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) {
  (gdb) print dlPtr
  $7 = (DLine *) 0x7fffb86b0160
  (gdb) print dlPtr->nextPtr
  $8 = (struct DLine *) 0x7fffb86b0210
  (gdb) print dlPtr->nextPtr->dlPtr
  There is no member named dlPtr.
  (gdb) step
  4213		if ((dlPtr->flags & OLD_Y_INVALID)
  (gdb) 
  4218		    continue;
  (gdb) 
  4189	    for (dlPtr = dInfoPtr->dLinePtr; dlPtr != NULL; dlPtr = dlPtr->nextPtr) {
  (gdb) print dlPtr
  $9 = (DLine *) 0x7fffb86b0210
  (gdb) print dlPtr->nextPtr
  $10 = (struct DLine *) 0x7fffb86b0160
  (gdb) 

  See that dlPtr->nextPtr refers to 0x7fffb86b0210 which then refers to 0x7fffb86b0160 which then refers to 0x7fffb86b0210.

  The origin of the [puts] is another thread which did a [thread::send tid {puts mytext}]
  For completeness I am using tkcon which runs in the main thread.

  Regards


tkt_uuid: 770add1891d9e8d817eaa0e8556b6e9566c507fa
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 7 High
severity: Important
foundin: all
title: Flushing of persistent storage + mem-leak fix
cmimetype: text/x-fossil-wiki
submitter: sebres
assignee: nobody
closer: sebres
closedate: 2458081.16681414
comment:
  I was wondering that if tcl application properly exits (calling all exit-handlers, etc.), then all still bound persistent storages are flushed (together with arrays, by implicit delete of all arrays in SvFinalize).

  IMHO this is a bug, because I believe the name "persistent storage" means persistent.
  But ATM only if "unbound" called before exit, it does not occur.

  Fixed within [c00a271dae] now.

  Additionally this resolves a memory leak by "tsv::array unbound" (especially annoying if bound/unbound switching often).

  See check-in [c00a271dae] for more info.

  BTW. I've created still one branch with possibility to compile with lmdb handler for windows, see [31d323157d].


tkt_uuid: 8a8155b0e1eb386ad3111287c40b098790cfe815
type: Bug
status: Closed
resolution: Out of Date
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
title: compiler warning - looks serious
cmimetype: text/plain
submitter: dgp
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2458065.85814421
comment:
  /Users/dgp/fossil/tcl/pkgs/thread/generic/threadCmd.c:946:23: warning: shifting
        a negative signed value is undefined [-Wshift-negative-value]
              flags &= ~THREAD_SEND_WAIT;
                       ~^~~~~~~~~~~~~~~~
  /Users/dgp/fossil/tcl/pkgs/thread/generic/threadCmd.c:268:27: note: expanded
        from macro 'THREAD_SEND_WAIT'
  #define THREAD_SEND_WAIT 1<<1


  Looks like we may need some parens.


tkt_uuid: 10401858b07066ec27e04ee78a2409e49d60f1ed
type: Patch
status: Closed
resolution: Rejected
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
private_contact: 3cb4dabca0e1e7b9d560b2ca060abb67f2a97f23
title: Thread package configure fails with Tcl 9
cmimetype: text/plain
submitter: petasis
assignee: jan.nijtmans
closer: jan.nijtmans
closedate: 2458162.97932877
comment:
  Index: configure.ac
  ==================================================================
  --- configure.ac
  +++ configure.ac
  @@ -34,15 +34,15 @@
   #--------------------------------------------------------------------
   
   TEA_PATH_TCLCONFIG
   TEA_LOAD_TCLCONFIG
   
  -if test "${TCL_MAJOR_VERSION}" -ne 8 ; then
  +if test "${TCL_MAJOR_VERSION}" -lt 8 ; then
       AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.4+
   Found config for Tcl ${TCL_VERSION}])
   fi
  -if test "${TCL_MINOR_VERSION}" -lt 4 ; then
  +if test "${TCL_MAJOR_VERSION}" -eq 8 && test "${TCL_MINOR_VERSION}" -lt 4 ; then
       AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.4+
   Found config for Tcl ${TCL_VERSION}])
   fi
   
   #--------------------------------------------------------------------


tkt_uuid: c72c2eb54b644dc5e5b44b6a410311fca1b7a3ef
type: Bug
status: Closed
resolution: Invalid
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.8.2
private_contact: 1c57e67924247fd7926e89348f266c081ec57db2
title: Invalid channel names in thread
cmimetype: text/plain
submitter: tomkiti
assignee: nobody
closer: sebres
closedate: 2458183.07564075
comment:
  In wish 8.6.8 on Windows, the 2nd, 3rd, and 4th files that are opened within a thread return the channel names stdin, stdout, and stderr. This does not happen in the main thread, in tclsh 8.6.8, in wish 8.5.*, or on Linux.

  For example, the following script writes the first 5 opened channel names to a log file:

      package require Thread
      set tid [::thread::create]
      ::thread::send $tid {
          set chan1 [open c:/temp/log.txt w]
          set chan2 [open nul w]
          set chan3 [open nul w]
          set chan4 [open nul w]
          set chan5 [open nul w]
          puts $chan1 "chan1 = $chan1"
          puts $chan1 "chan2 = $chan2"
          puts $chan1 "chan3 = $chan3"
          puts $chan1 "chan4 = $chan4"
          puts $chan1 "chan5 = $chan5"
          close $chan1
          close $chan2
          close $chan3
          close $chan4
          close $chan5
      }
      exit

  The file c:/temp/log.txt will contain something like:

      chan1 = file303b0c0
      chan2 = stdin
      chan3 = stdout
      chan4 = stderr
      chan5 = file3033160

  I don't know if the problem is in Tcl, wish, or the Thread package, but I'm reporting it here.


tkt_uuid: c6057948e5f884435ee35517008db0205f286a5e
type: Bug
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Critical
title: tsv commands break thread access rules for Tcl values
cmimetype: text/plain
submitter: dgp
assignee: aku
closer: nobody
comment:
  Multi-thread access to a Tcl_Obj struct is at best perilous
  because the Tcl_IncrRefCount and Tcl_DecrRefCount public
  routines are not routines at all, but macros.

  And they are macros written with the strong assumption that
  while they operate the caller has exclusive access to the field.
  The only safe approach is to follow a strict rule that any
  Tcl_Obj is accessed by only a single thread that can be said
  to "own" that value. If you need to pass a value from one thread
  to another, you need to have the second thread create its own
  copy of the first, quite possibly limited only to the mechanism
  of making a full copy of the string rep.

  These rules are checked by the Tcl core when the --enable-symbols=mem
  configuration setting is on. Tcl_Obj allocation stores the allocated
  pointer in a thread-local hash map, and deallocation removes from
  the same thread-local hash map.  Some mismatches (but not all?!?!)
  are detected with a Tcl_Panic().


tkt_uuid: 76f47e0376fb8b2783627799fd7f2adab66d98f9
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: all
title: thread::send -async script varname aborts with "alloc: invalid block"
cmimetype: text/x-fossil-wiki
submitter: pooryorick
assignee: nobody
closer: pooryorick
closedate: 2458316.96685882
comment:
  With a Tcl compiled with <code>--enable-symbols</code> , the script


  <code><verbatim>
  package require Thread
  set t1 [thread::create]
  thread::send -async $t1 {lindex {}} [expr 0]
  </verbatim></code>

  results in:


  <code><verbatim>
  alloc: invalid block
  </verbatim></code>


  This happens because <code>threadSendFree</code>
  [https://core.tcl.tk/thread/artifact?udc=1&ln=992&name=27b80f574a4ced5a|
  obtains the length] of a <code>Tcl_Obj</code> before the string representation
  for that object is generated, and a few lines later
  [https://core.tcl.tk/thread/artifact?udc=1&ln=1014&name=27b80f574a4ced5a|the
  string representation is generated].


tkt_uuid: b5709ea9060d17f58ba48110351c964b3408e362
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.8.0
private_contact: 219192cc5b7de6cef9c96726d1feb29d0382f2dc
title: [::thread::send -async] posting order not respected when sending to current thread
cmimetype: text/plain
submitter: adrianmedranocalvo
assignee: nobody
closer: sebres
closedate: 2458691.15444822
comment:
  if {0} {
  When the target thread of [::thread::send -async] is the current thread, the
  async script is not evaluated in order with respect to other [::thread::send
  -async] scripts.

  Let's call a [::thread::send -async] invoked from the current thread and
  directed to the current thread a local [::thread::send -async], and a
  [::thread::send -async] invoked from any other thread and directed to the former
  thread a remote [::thread::send -async].

  Current behaviour is that all remote [::thread::send -async] scripts will be
  evaluated before any local [::thread::send -asinc] scripts are, even in the case
  where the local scripts have been posted before the remote ones.  See the script
  below for a concise example.

  Intuitively, [::thread::send -async] scripts should be queued and evaluated in
  the order they were added to the queue (that is, except if the -head argument
  was given).

  The script below demostrates this issue.  We append to a global variable in
  the main thread in four different ways, in order:
  - An after 0 script
  - An after idle script
  - A local [thread::send -async]
  - A remote [thread::send -async]
  - Another after 0 script
  - Another after idle script

  The printed trace of the script is reproduced below.  Contrary to the posting
  order, the remote [thread::send -async] is evaluated before the local
  [thread::send -async].

  ~~~
  REMOTE-THREAD-SEND
  AFTER0-BEG
  AFTER0-END
  IDLE-BEG
  LOCAL-THREAD-SEND
  IDLE-END
  ~~~

  Without knowing the details of the Thread package, one would expect the local
  and remote [thread::send -async] to be evaluated in the order they were
  posted.  Instead, the remote [thread::send -async] are invariably evaluated
  before the local ones; and the local ones are evaluated as [after idle] commands.

  The cause for this behaviour is an optimization in threadCmd.c, commented as
  "Short circuit sends to ourself", where local [thread::send -async] are
  converted to [after idle], implying that a different queue is used for local
  [thread::send -async] events as oposed to remote [thread::send -async] events.

  How important is this optimization?  I can't see much performance being lost if
  we would disable the optimization and would let local [::thread::send -async] be
  added to the queue along with all others.  The benefit from this change would be
  a more consistent behaviour.
      
  The underlying use-case is a server with connection-specific threads.  The
  connection-specific thread uses local [thread::send -async] in order to delay
  the flushing of responses, so that the application's locks are grabbed for a
  minimum amount of time.  Other threads use remote [thread::send -async] to the
  connection thread in order to send messages through the connection.  The
  optimization above difficults ensuring the order the responses are flushed.

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  }

  package require Thread;

  set t(main) [::thread::id]
  set t(other) [::thread::create]

  # Let t(other) know the main thread's id, t(main).
  ::thread::send $t(other) [list array set t [array get t]]

  after 0 {lappend ::trace AFTER0-BEG;}
  after idle {lappend ::trace IDLE-BEG;}

  ::thread::send -async $t(main) {
      lappend ::trace LOCAL-THREAD-SEND;
  }
  ::thread::send $t(other) {
      ::thread::send -async $t(main) {
  	lappend ::trace REMOTE-THREAD-SEND;
      }
  }

  after 0 {lappend ::trace AFTER0-END;}
  after idle {lappend ::trace IDLE-END;}

  after 100 {set forever now};
  vwait forever;
  puts [join $::trace "\n"];

  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


tkt_uuid: e7bcc945210ae351693ad9d526308b3d40bd645a
type: RFE
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 2.8.4
title: Support change notifications for thread shared variables
cmimetype: text/plain
submitter: elfring
assignee: nobody
closer: nobody
comment:
  I find the direct support for thread shared variables (also together with the TCL command “trace”) generally nice.
  I would appreciate to get notified for changes in selected TCL variables.
  How do you think about a collaboration of their internal locking with condition variables?

  See also:
  https://core.tcl-lang.org/tcl/tktview?name=6ff44a29cea4b3fb72634f551cecb5917f837cf2


tkt_uuid: f5a5c23f47bef3d709e85c7d1f5883e473b8125b
type: Bug
status: Closed
resolution: Fixed
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 2.8.4
title: Clarify execution order for thread creation scripts
cmimetype: text/plain
submitter: elfring
assignee: nobody
closer: elfring
closedate: 2458613.79488588
comment:
  I have tried the following small script out for the software “TCL 8.6.9-1.5” on an openSUSE system.

  package require Thread
  puts {Thread creation}
  set id [thread::create {
                         puts "The thread [thread::id] will sleep for a moment."
                         after 1200
                         puts "The thread [thread::id] is waiting for work."
                         thread::wait
                         }]
  puts "Additional thread ($id) was created."
  puts {The main thread will sleep for a moment.}
  after 1230
  puts {End of test case}


  Test result:

  elfring@Sonne:~/Projekte/TCL> tclsh test-thread1.tcl
  Thread creation
  The thread tid0x7fadfc763700 will sleep for a moment.
  Additional thread (tid0x7fadfc763700) was created.
  The main thread will sleep for a moment.
  The thread tid0x7fadfc763700 is waiting for work.
  End of test case


  I got the impression from such test output that the main thread is informed about the identification for the additional thread before the preparation script of this extra thread was finished.
  I find that such software behaviour points details out which are worth for helpful explanations in the provided documentation.
  https://www.tcl.tk/man/tcl/ThreadCmd/thread.htm#M6

  There are some data processing consequences to consider if you can not depend on a known execution order by this programming interface.
  How would you like to clarify this situation?

  See also:
  https://core.tcl-lang.org/tcl/tktview/d82a78ebf2b9ede7aa6b87b47b3f316d0c0c816e


tkt_uuid: 90de9ddf94ecfb6bacd5e754919a21d31fe3f25a
type: Bug
status: Closed
resolution: Invalid
subsystem: 80. Thread Package
priority: 5 Medium
severity: Important
foundin: 2.8.4
title: Checking data consistency for unlocking of mutexes
cmimetype: text/plain
submitter: elfring
assignee: nobody
closer: elfring
closedate: 2458614.20565142
comment:
  I am trying again to get a multi-threaded data processing approach working also together with the programming language “TCL 8.6.9-1.5” on an openSUSE system.
  I have detected questionable software behaviour during my tests.

  Test output example:
  …
  3. run
  1 threads are working.
  mutex is not locked
      while executing
  "thread::mutex unlock [tsv::get [tsv::get shared context] pcm]"
      (procedure "main_thread_unlock_start" line 1)
      invoked from within
  "main_thread_unlock_start"
      (procedure "perform_command" line 11)
      invoked from within
  "perform_command"
      (procedure "repeat_command" line 5)
      invoked from within
  "repeat_command"
      (procedure "run_analysis" line 2)
      invoked from within
  "run_analysis"
      (file "test-synchronisation1-20190506.tcl" line 133)


  How do you think about to check if any more data processing surprises can be found by an example script like the following?


  package require Thread
  set results {}

  proc perform_command {} \
  {
  tsv::set [tsv::get shared context] pcm [thread::mutex create]
  thread::mutex lock [tsv::get [tsv::get shared context] pcm]
  tsv::set [tsv::get shared context] pcc [thread::cond create]

  try \
     {
     tsv::set [tsv::get shared context] working 0
     tsv::set [tsv::get shared context] finish_notification 0
     } \
  finally \
     {
     proc main_thread_unlock_start {} \
     {thread::mutex unlock [tsv::get [tsv::get shared context] pcm]}
     main_thread_unlock_start
     }

  for {set x 1} {$x <= 6} {incr x} \
     {
     set t($x) [thread::create {
                               proc handle_input {} \
                               {
                               thread::mutex lock [tsv::get [tsv::get shared context] pcm]

                               try \
                                  {
                                  puts stderr "[tsv::incr [tsv::get shared context] working] threads are working."
                                  } \
                               finally \
                                  {
                                  proc handle_input_unlock_begin {} \
                                  {thread::mutex unlock [tsv::get [tsv::get shared context] pcm]}
                                  handle_input_unlock_begin
                                  }

                               thread::mutex lock [tsv::get [tsv::get shared context] pcm]

                               try \
                                  {
                                  tsv::incr [tsv::get shared context] working -1

                                  if [tsv::get [tsv::get shared context] finish_notification] \
                                     {
                                     puts stderr {thread::cond notify finish}
                                     thread::cond notify [tsv::get [tsv::get shared context] pcc]
                                     }
                                  } \
                               finally \
                                  {
                                  proc handle_input_unlock_end {} \
                                  {thread::mutex unlock [tsv::get [tsv::get shared context] pcm]}
                                  handle_input_unlock_end
                                  }
                               }

                               handle_input
                               }]
     }

  puts stderr "Worker threads were started."
  thread::mutex lock [tsv::get [tsv::get shared context] pcm]

  try \
     {
     tsv::set [tsv::get shared context] finish_notification 1

     while {[set w [tsv::get [tsv::get shared context] working]] > 0} \
        {
        puts stderr "cond wait finish for $w threads"
        thread::cond wait [tsv::get [tsv::get shared context] pcc] [tsv::get [tsv::get shared context] pcm]
        }
     } \
  finally \
     {
     proc main_thread_unlock_finish {} \
     {thread::mutex unlock [tsv::get [tsv::get shared context] pcm]}
     main_thread_unlock_finish
     }

  global results
  lappend results [llength [thread::names]]
  #thread::cond destroy [tsv::get [tsv::get shared context] pcc]
  #thread::mutex destroy [tsv::get [tsv::get shared context] pcm]
  }

  proc repeat_command {} \
  {
  for {set x 1} {$x <= 12} {incr x} \
     {
     puts stderr "$x. run"
     tsv::set shared context $x
     perform_command
     }
  }

  proc run_analysis {} \
  {
  repeat_command
  global results

  if [llength ${results}] \
     {
     proc report {} \
     {
     global results

     foreach k ${results} \
        {
        dict incr counts $k
        }

     set delimiter |
     puts [join {{"still running threads"} incidence} ${delimiter}]

     dict for {k v} ${counts} \
        {
         puts "$k${delimiter}$v"
        }
     }

     report
     } \
  else \
     {
     puts stderr {No result for this analysis!}
     }
  }

  run_analysis


  See also:
  https://core.tcl-lang.org/tcl/tktview/0f439992eff158ca991ee191f89a6bd4c4eb51e9


tkt_uuid: 4b9dc05e4ecc9fda484386a41e58fa480490b6e1
type: Patch
status: Open
resolution: None
subsystem: 80. Thread Package
priority: 5 Medium
severity: Minor
foundin: 8.6.9
private_contact: ce0e7e9d5292991e390bcdefffa2ac7b77c4800a
title: documentaion of thread::send command
cmimetype: text/plain
submitter: anonymous
assignee: nobody
closer: nobody
comment:
  In https://www.tcl.tk/man/tcl8.6/ThreadCmd/thread.htm,
  there seems to be a small formatting glitch in the example provided for thread::send command.

  In my browser it's rendered like this :

  set t1 [thread::create]
      set t2 [thread::create]
      thread::send -async $t1 "set a 1" result
      thread::send -async $t2 "set b 2" result
      for {set i 0} {$i < 2} {incr i} {
          vwait result
      }

  I suppose the indentation below the first line isn't intended
  (and may produce a false reasoning if the lack of "{" isn't noticed at the end of the first line (for bad eyes...)

  Patch :

  set t1 [thread::create]
  set t2 [thread::create]
  thread::send -async $t1 "set a 1" result
  thread::send -async $t2 "set b 2" result
  for {set i 0} {$i < 2} {incr i} {
       vwait result
      }


  Thank you


