Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-06-18
15:36 • Ticket [762398ffff] support thread priority (Windows only) status still Open... artifact: 571a470525 user: dkf
2003-06-28
23:36 • Ticket [762398ffff]: 4 changes artifact: 1982055247 user: vasiljevic
23:00 • Add attachment threadCmd.zip to ticket [762398ffff] artifact: dc562f9916 user: nobody
23:00 • Ticket [762398ffff] support thread priority (Windows only) status still Open... artifact: 6d330ae5fe user: nobody
16:00 • New ticket [762398ffff]. artifact: 0dfc040232 user: nobody

support thread priority (Windows only)

Open762398ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 17 years ago
Descriptionplain2003-06-28 16:00:44
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
nobodyplain2003-06-28 23:00:44
File Added - 54370: threadCmd.zip
vasiljevicplain2003-06-28 23:36:35
Logged In: YES 
user_id=95086

This is nice. Thanks for the input. I will review this 
and put it in the standard thread extension. 
No, Unix does not have an equivalent of this so I assume 
that we'd always return empty string on priority inquiry. 
The only question is: what to do for priority setting?  
Throw error? Eat every string silently?
dkfplain2009-06-18 15:36:05
The other possibility is to say that all Unix threads are priority 0, and that that's both minimum and maximum.
Log in (anonymous is fine) to add a comment.

Attachments: