Skip to content
Tcl Source Code History Of Ticket 1512225
Login

History Of Ticket 1512225

Artifacts Associated With Ticket 1512225

  1. Ticket change [b8dcf95d89] (rid 129035) by nyademo on 2006-06-25 18:38:22:

    1. assignee initialized to: "vasiljevic"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      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.
      
    4. foundin initialized to: "obsolete: 8.4.13"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nyademo"
    9. subsystem initialized to: "80. Thread Package"
    10. title initialized to:
      tpool::wait and tpool::cancel set wrong value to variable
      
    11. type initialized to: "Bug"
  2. Add attachment "threadPoolCmd.c.patch" [7b379af435] (rid 90484) by nyademo on 2006-06-26 01:38:22.

  3. Ticket change [da0f89114b] (rid 107709) by nyademo on 2006-06-26 01:38:22:

    1. icomment:
      
      
      File Added - 182941: threadPoolCmd.c.patch
      
      
      
    2. login: "nyademo"
    3. mimetype: "text/plain"
    4. username: "nyademo"
  4. Ticket change [994f190f33] (rid 110770) by vasiljevic on 2007-06-30 22:29:52:

    1. icomment:
      Logged In: YES 
      user_id=95086
      Originator: NO
      
      Great work! Many thanks for the patch
      and your time. I have added this into the
      CVS head. Please checkout and see if
      all is fine. Your test programs work as
      expected now. The fixed will appear first
      in 2.6.6 version.
      
      Cheers,
      Zoran
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  5. Ticket change [a5216b6798] (rid 110321) by vasiljevic on 2007-06-30 22:31:16:

    1. closedate changed to: "2007-06-30T15:31:16"
    2. closer changed to: "vasiljevic"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"