#5051 tpool::wait does not return pending jobs

obsolete: 8.5.11
closed-accepted
5
2012-09-13
2012-06-11
No

If the optional ?varname? is supplied to tpool::wait, it returns an empty string even if there are jobs pending.

Discussion

  • Tim Tomkinson

    Tim Tomkinson - 2012-06-11

    Test Script

     
  • Zoran Vasiljevic

    I cannot verify this. For me it seems to work correctly:

    lexxsrv:nscp 1> tpool::create
    tpool0x3a7d270
    lexxsrv:nscp 2> tpool::post tpool0x3a7d270 "after 100000"
    1
    lexxsrv:nscp 3> tpool::post tpool0x3a7d270 "after 50000"
    2
    lexxsrv:nscp 4> tpool::wait tpool0x3a7d270 "1 2" pending
    2
    lexxsrv:nscp 5> set pending
    1

     
  • Tim Tomkinson

    Tim Tomkinson - 2012-06-12

    I get a different result:

    Z:\>tclsh
    % package require Thread
    2.6.7
    % tpool::create
    tpool01413310
    % tpool::post tpool01413310 "after 100000"
    1
    % tpool::post tpool01413310 "after 50000"
    2
    % tpool::wait tpool01413310 "1 2" pending
    2
    % set pending
    % exit

    Z:\>

    I'm running ActiveTcl8.5.11 on Windows 7, RedHat 5.7, and SunOS 5.9 and get the same results.

     
  • Zoran Vasiljevic

    Wierd. Then somebody broke something between 2.6.6
    (the last one I made any changes to) and the 2.6.7...
    This needs more examination.

     
  • Zoran Vasiljevic

    So far I can see, the code from 2.6.5 and 2.6.7 did not change.
    Which means that it has something to do with core 8.5.11.
    We are still at 8.4 and there I cannot see any problem.

     
  • Tim Tomkinson

    Tim Tomkinson - 2012-06-12

    I just tried it with ActiveTcl8.4.19 and see the problem.

     
  • Zoran Vasiljevic

    Then we will need to debug that part :-)

     
  • Zoran Vasiljevic

    Unfortunately... I cannot reproduce this at will.
    I DO get sometimes the same result but only
    when I use some older compilation of the extension.
    If I recompile the, say, 2.6.5 fresh, I cannot get any problem.
    I will look into this in more detail but this will require time.

     
  • Zoran Vasiljevic

    Are you compiling the extension yourself or do you use
    precompiled binary?

     
  • Zoran Vasiljevic

    • status: open --> open-accepted
     
  • Zoran Vasiljevic

    OK. I am now able to reproduce it. This is a kind-of race condition
    which I have to understand. This is the explanation why it is sometimes
    visible and why not.

     
  • Zoran Vasiljevic

    Hi!

    It was not (as anticipated) a race-condition. It was a regular bug.
    I now need to figure out how to submit my changes using this all
    new fancy SCM system that I', new at...

    The fix will appear in 2.7.0 release. Thank you for reporting the bug.

     
  • Tim Tomkinson

    Tim Tomkinson - 2012-06-15

    Thank you for fixing it!

     
  • Zoran Vasiljevic

    • status: open-accepted --> closed-accepted
     
  • Zoran Vasiljevic

    Fixed in 2.7

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks