Tcl Source Code

View Ticket
Login
Ticket UUID: 3534581
Title: tpool::post -nowait still waits
Type: Bug Version: obsolete: 8.5.11
Submitter: tomkiti Created on: 2012-06-12 13:06:58
Subsystem: 80. Thread Package Assigned To: vasiljevic
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2012-09-13 18:23:00
Resolution: Accepted Closed By: vasiljevic
    Closed on: 2012-09-13 11:23:00
Description:
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.
User Comments: vasiljevic added on 2012-09-13 18:23:00:

allow_comments - 1

This has been addressed in 2.7

vasiljevic added on 2012-06-12 20:33:28:
You are right. There is a bug there. 
Currently. if -nowait option to thread::post is specified AND 
there are no workers for the pool configured then we 
spin-off a new worker and wait for it to catch-up. 
BUT if there ARE some workers yet they are all busy then 
we wait for first to become free. 
Instead we should simply spin-off new worker if none 
configured OR just post the job ticket and return w/o 
waiting for any worker to become free.

tomkiti added on 2012-06-12 20:07:03:

File Added - 445856: postNowaitBug.tcl

Attachments: