Ticket UUID: | 762398 | |||
Title: | support thread priority (Windows only) | |||
Type: | Patch | Version: | None | |
Submitter: | nobody | Created on: | 2003-06-28 16:00:44 | |
Subsystem: | 80. Thread Package | Assigned To: | vasiljevic | |
Priority: | 5 Medium | Severity: | ||
Status: | Open | Last Modified: | 2009-06-18 15:36:05 | |
Resolution: | None | Closed By: | ||
Closed on: | ||||
Description: |
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 | |||
User Comments: |
dkf added on 2009-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. vasiljevic added on 2003-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? nobody added on 2003-06-28 23:00:44: File Added - 54370: threadCmd.zip |
Attachments:
- threadCmd.zip [download] added by nobody on 2003-06-28 23:00:44. [details]