KProcess Nice level

Harri Porten porten at kde.org
Tue May 27 19:14:16 BST 2003


On Tue, 27 May 2003, Oswald Buddenhagen wrote:

> that's my thinking, too, but to quote two mails from the thread on
> kde-devel:

Ah. That's where those suggestions came from. Sorry.

> On Fri, May 23, 2003 at 08:41:14PM +0200, Luis Pedro Coelho wrote:
> > Add a couple of priority constants as well (Priority::High,
> > Priority::Normal, Priority::Low, Priority::VeryLow) since the standard
> > 19 to -19 (or is it 20 to -19, or whatever) is not really friendly -
> > there should be a way to specify the exact posix style value, of
> > course.

I think that's a bit of overengineering. At least if it's stuffed into a
single function. No type safety, not easy to read. We don't want

 p.setPriority(Horizontal)
 
to compile, do we ? :)

> On Tue, May 27, 2003 at 05:23:26AM +0200, Luis Pedro Coelho wrote:
> > and I still think that it is a good solution. Unix-style values are a
> > really bad interface, IMHO, especially if you use them in a magic
> > number style. Why not just add an enum with the most important values?

Just having enums for now sounds better to me.

Harri.

P.S. I personally wouldn't mind using Priority::Low etc. Or least
PriorityLow as a compromise. What do others think ?

P.P.S. Translating the options available in the Windows Task Manager
into enums would give High, AboveNormal, Normal, BelowNormal and Low
(excluding Realtime)





More information about the kde-core-devel mailing list