Message101148
You know, I almost wonder whether this whole issue could be fixed by just adding a user-callable function to optionally set a thread priority number. For example:
sys.setpriority(n)
Modify the new GIL code so that it checks the priority of the currently running thread against the priority of the thread that wants the GIL. If the running thread has lower priority, it immediately drops the GIL.
Other than having this added preemption, do nothing else---just throw it all back to the user to come up with the proper "priorities."
If there was something like this, it would completely fix the overlapped compute and I/O problem I mentioned. I'd just set a higher priority on the background I/O threads and be done with it. Problem solved.
Ok, it's only a thought. |
|
Date |
User |
Action |
Args |
2010-03-16 02:36:35 | dabeaz | set | recipients:
+ dabeaz, loewis, jhylton, pitrou, eric.smith, kevinwatters, tarek, karld, carljm, coderanger, nirai, alex, brian.curtin, flox, DazWorrall, rh0dium, rcohen, mahmoudimus |
2010-03-16 02:36:35 | dabeaz | set | messageid: <1268706995.07.0.920646847998.issue7946@psf.upfronthosting.co.za> |
2010-03-16 02:36:33 | dabeaz | link | issue7946 messages |
2010-03-16 02:36:33 | dabeaz | create | |
|