[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Adding ThreadWeaver libraries to kdelibs
From:       Thomas Zander <zander () kde ! org>
Date:       2006-09-07 18:10:11
Message-ID: 200609072010.11863.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


On Thursday 7 September 2006 19:56, Alexander Neundorf wrote:
> > OK, getter added. About the name - I think cap is very descriptive.
>
> Ok, I'm no native speaker. To me it's not "very descriptive".
> What does cap() stand for ? Capacity ? Capability ? Something else ?

Lol; its not an abbreviation. Its a normal English word.
Webster describes it as:
 an upper limit (as on expenditures) : CEILING

Which fits perfectly with the concept used.

Common usage:
"I set a cap on how much I can spent on ebay per month"
"My wife capped the amount of beers I can drink per night at 5"

Ok; how about attached doc patch;

-- 
Thomas Zander

["rrp.diff" (text/x-diff)]

Index: ResourceRestrictionPolicy.h
===================================================================
--- ResourceRestrictionPolicy.h	(revision 581844)
+++ ResourceRestrictionPolicy.h	(working copy)
@@ -45,7 +45,15 @@
         explicit ResourceRestrictionPolicy ( int cap = 0);
         ~ResourceRestrictionPolicy();
 
-        void setCap (int newcap);
+        /**
+         * Cap the number of simulataniously executing jobs.
+         * Capping the amount of jobs will make sure that at max the number of jobs
+         * executing at any time is limited to the capped amount.
+         * Note that immediately after setting the amount of running jobs may be higher
+         * than the set amount. This setting only limits the starting of new jobs.
+         * @param newCap the new cap to limit the amount of parallel jobs.
+         */
+        void setCap (int newCap);
         int cap() const;
         bool canRun( Job* );
         void free (Job*);

[Attachment #6 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic