[WIP] Parallel timeout for fetching PPD files.
Issue https://github.com/OpenPrinting/cups/issues/65
When some of the PPD generators took more then 60 seconds to get PPD files then cups expires the scheduler.
To solve the issue, created a separate thread along with the main thread. Main thread waits for the timeout and the separate thread calls cupsFileGets() to get the PPD files. If it is not able to fetch it within timeout, the main thread terminates the separate thread.
@zdohnal @michaelrsweet Please review it. Thanks !
This doesn't appear to do what we need it to do.
In order for this change to work, we need to run the driver interface programs in the background (in separate threads, or just poll'ing with the cupsFileNumber's which might be simpler and it will be easier to time them out together) and then limit the total amount of time they can run...
Okay so the idea is to divide the ppd generators into different available threads and use poll.h (instead of pthread which I have done currently) in every thread such that it does not exceed timeout. I will first try to implement poll.h as it would be universal in every scenario such as when the CPU won't be having multiple threads.
@michaelrsweet
SIr, I have added poll.h and removed the former pthread.h for creating timeout for PPD descriptors. Please review it.
Thanks !
Hi @pranjanpr ,
any updates regarding implementing what Mike has requested?
Hi, I didn't have any progress since the last commit.
The original issue is closed, so the enhancement is no longer required.
Thank you for the PR nevertheless!