From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1d4203bfa2644439 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.74.79 with SMTP id r15mr4044838wiv.4.1355343914050; Wed, 12 Dec 2012 12:25:14 -0800 (PST) Path: i11ni139967wiw.0!nntp.google.com!goblin1!goblin.stu.neva.ru!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Task with access to itself? Date: Wed, 12 Dec 2012 21:25:07 +0100 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87k3snj9wc.fsf@adaheads.sparre-andersen.dk> References: <8738zk7gge.fsf@adaheads.sparre-andersen.dk> <87ehiwygv1.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: 94.191.242.48.bredband.3.dk Mime-Version: 1.0 X-Trace: munin.nbi.dk 1355343909 21514 94.191.242.48 (12 Dec 2012 20:25:09 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 12 Dec 2012 20:25:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:66ntDAJFy+jQQX2+jJ6r/VwPHo0= Content-Type: text/plain; charset=us-ascii Date: 2012-12-12T21:25:07+01:00 List-Id: Jeffrey Carter wrote: > Jacob Sparre Andersen wrote: >> 2) Control over which order the worker tasks are activated in. > > Why? They're all identical. In our case, we only allocate a task when > there's a job to do and no existing task to handle it; such tasks are > of course activated in the order they're created. Because I prefer to activate the most recently used task first, as it is likely to be the one which is "closest" to a CPU (i.e. least likely to be swapped out to disk). Greetings, Jacob -- "Being an absolute ruler today was not as simple as people thought. At least, it was not simple if your ambitions included being an absolute ruler tomorrow."