Thread priority

Jun 24, 2009 at 7: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!

Coordinator
Jun 25, 2009 at 11:54 AM

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

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

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

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

Hope this helps.

Coordinator
Jun 25, 2009 at 5:23 PM

I just remembered that thread examples are  in SevenZipTest too.