This project is read-only.

Thread priority

Jun 24, 2009 at 8:22 PM

Is there a way to lower the thread priority so the compressing takes less CPU?  If not can this be implemented?

The project I am working on needs to compress logs, but this should be done without causing the critical applications to be starved for the CPU.

Also... thanks for the Append feature... works fantastic!

Jun 25, 2009 at 12:54 PM

ftrocchi, compression is performed in a separate thread in SevenZipTestForms. See the code:

            Thread worker = new Thread(new ThreadStart(Compress));

You can compress with a different priority by setting the Priority property:

            Thread worker = new Thread(new ThreadStart(Compress));
            worker.Priority = ThreadPriority.Lowest;

Hope this helps.

Jun 25, 2009 at 6:23 PM

I just remembered that thread examples are  in SevenZipTest too.