Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-09-13
18:29 • Closed ticket [3534440fff]: tpool::wait does not return pending jobs plus 6 ... artifact: 2d919ffdb1 user: vasiljevic
2012-06-15
11:02 • Ticket [3534440fff]: 4 changes artifact: 3580e59fbf user: tomkiti
2012-06-14
16:13 • Ticket [3534440fff]: 4 changes artifact: 90b4934c80 user: vasiljevic
00:15 • Ticket [3534440fff]: 5 changes artifact: f8b251743b user: vasiljevic
2012-06-13
03:13 • Ticket [3534440fff]: 4 changes artifact: 4d4cef4aa3 user: vasiljevic
03:00 • Ticket [3534440fff]: 4 changes artifact: b6d4da5aec user: vasiljevic
02:19 • Ticket [3534440fff]: 4 changes artifact: a71bca4be2 user: vasiljevic
01:10 • Ticket [3534440fff]: 4 changes artifact: 4418f69fdb user: tomkiti
00:02 • Ticket [3534440fff]: 4 changes artifact: 3e6358136b user: vasiljevic
2012-06-12
23:49 • Ticket [3534440fff]: 4 changes artifact: b3c52ba4a1 user: vasiljevic
23:32 • Ticket [3534440fff]: 4 changes artifact: de3553e37b user: tomkiti
22:02 • Ticket [3534440fff]: 4 changes artifact: eb5bfc1958 user: vasiljevic
04:05 • Ticket [3534440fff]: 4 changes artifact: a00b6e698b user: tomkiti
04:05 • Add attachment tpoolBug.tcl to ticket [3534440fff] artifact: 6050788c66 user: tomkiti
2012-06-11
21:05 • New ticket [3534440fff] tpool::wait does not return pending jobs. artifact: 03e43cb133 user: tomkiti

tpool::wait does not return pending jobs

Closed / Accepted3534440fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2012-06-11 21:05:56
If the optional ?varname? is supplied to tpool::wait, it returns an empty string even if there are jobs pending.
tomkitiplain2012-06-12 04:05:56
File Added - 445803: tpoolBug.tcl
vasiljevicplain2012-06-12 22:02:49
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
tomkitiplain2012-06-12 23:32:32
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.
vasiljevicplain2012-06-12 23:49:23
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.
vasiljevicplain2012-06-13 00:02:09
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.
tomkitiplain2012-06-13 01:10:21
I just tried it with ActiveTcl8.4.19 and see the problem.
vasiljevicplain2012-06-13 02:19:50
Then we will need to debug that part :-)
vasiljevicplain2012-06-13 03:00:03
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.
vasiljevicplain2012-06-13 03:13:48
Are you compiling the extension yourself or do you use
precompiled binary?
vasiljevicplain2012-06-14 00:15:50
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.
vasiljevicplain2012-06-14 16:13:31
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.
tomkitiplain2012-06-15 11:02:30
Thank you for fixing it!
vasiljevicplain2012-09-13 18:29:07
allow_comments - 1

Fixed in 2.7
Log in (anonymous is fine) to add a comment.

Attachments: