<!-- 
RSS generated by JIRA (4.4#649-r158309) at Mon May 20 12:36:35 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CLJ-416/CLJ-416.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CLJ-416] improvments on agent</title>
                <link>http://dev.clojure.org/jira/browse/CLJ-416</link>
                <project id="10010" key="CLJ">Clojure</project>
                        <description>&lt;p&gt;hi,i have some ideas to improve the agent system:&lt;br/&gt;
1.Agent&apos;s thread pool must use a custom ThreadFactory to new threads.Set new thread a system name and set it to be daemon.Thread&apos;s name would be used for debug or monitor.And set thread to be daemon asking user to shutdown agents explicitly.&lt;/p&gt;

&lt;p&gt;2.Beacause agent&apos;s thread is daemon,so if a application doesn&apos;t use any agents,the thread pool must not started.I think the agent&apos;s thread pools should be lazy initialized.&lt;/p&gt;

&lt;p&gt;3.I think agent must allow use to define a agent-own thread pool.That thread pool is only used by a agent,not global.just like:&lt;br/&gt;
(define a (agent :executor (java.util.concurrent.Executors/newFixedThreadPool 2)))&lt;br/&gt;
or&lt;br/&gt;
(set-executor!  a  (java.util.concurrent.Executors/newFixedThreadPool 2))&lt;br/&gt;
And then,a new function to shutdown agent&apos;s custom thread pool:&lt;br/&gt;
(shutdown-agent a)&lt;/p&gt;

&lt;p&gt;Why do we need a custom thread pool?&lt;br/&gt;
First, the default thread pool is global, send use the thread pool&lt;br/&gt;
is a fixed size cpus +2, is likely to become the system bottleneck&lt;br/&gt;
sometime. Although you can use the send-off, use the cache thread&lt;br/&gt;
pool, but in a real world application, I can not use the cache thread&lt;br/&gt;
pool, which will introduce the risk of OutOfMemoryError, normally I&lt;br/&gt;
like to use a fixed-size thread pool.&lt;/p&gt;

&lt;p&gt;Second, the actions which global thread pool execute are from a&lt;br/&gt;
variety of agents, the actions are not homogeneous, and can not&lt;br/&gt;
maximize the efficient use of the thread pool.&lt;/p&gt;

&lt;p&gt;These are my suggestions on agent,thanks for this great language,i enjoy it.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13813">CLJ-416</key>
            <summary>improvments on agent</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                        <status id="6" iconUrl="http://dev.clojure.org/jira/images/icons/status_closed.gif">Closed</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="-1">None</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Jul 2010 16:15:00 -0500</created>
                <updated>Fri, 1 Mar 2013 12:47:03 -0600</updated>
                    <resolved>Tue, 27 Nov 2012 14:18:49 -0600</resolved>
                                            <fixVersion>Backlog</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="24167" author="importer" created="Tue, 24 Aug 2010 18:42:00 -0500"  >&lt;p&gt;Converted from &lt;a href=&quot;http://www.assembla.com/spaces/clojure/tickets/416&quot;&gt;http://www.assembla.com/spaces/clojure/tickets/416&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="30063" author="halgari" created="Tue, 27 Nov 2012 14:18:49 -0600"  >&lt;p&gt;Closing as &quot;completed&quot; as most of these requests are handled in 1.5 via the new send-via, and set executor functions.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>