<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>entroducing.com &#187; threads</title>
	<atom:link href="http://www.entroducing.com/view/tag/threads/feed" rel="self" type="application/rss+xml" />
	<link>http://www.entroducing.com</link>
	<description>to prove that i have too much time</description>
	<lastBuildDate>Sun, 15 May 2011 06:00:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Printing out active threads in java</title>
		<link>http://www.entroducing.com/view/printing-out-active-threads-in-java</link>
		<comments>http://www.entroducing.com/view/printing-out-active-threads-in-java#comments</comments>
		<pubDate>Sat, 20 Feb 2010 07:41:30 +0000</pubDate>
		<dc:creator>Benny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://www.entroducing.com/?p=157</guid>
		<description><![CDATA[Here&#8217;s the code snippets to display the number of running threads in your java program. It&#8217;s good to use it to track your resources. int activeCount = Thread.activeCount(); System.out.println(&#38;quot;total active = &#38;quot; + activeCount); Thread[] threads = new Thread[activeCount]; Thread.enumerate(threads); System.out.println(&#38;quot;before&#38;quot;); for (int j=0; j&#38;lt;threads.length; j++) { System.out.println(threads[j].toString()); } //run your classes Benny benny = new Benny(); [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the code snippets to display the number of running threads in your java program.</p>
<p>It&#8217;s good to use it to track your resources.</p>
<pre class="brush: java">
int activeCount = Thread.activeCount();
System.out.println(&amp;quot;total active = &amp;quot; + activeCount);
Thread[] threads = new Thread[activeCount];
Thread.enumerate(threads);

System.out.println(&amp;quot;before&amp;quot;);
for (int j=0; j&amp;lt;threads.length; j++) {
 System.out.println(threads[j].toString());
}

//run your classes
Benny benny = new Benny();

activeCount = Thread.activeCount();
System.out.println(&amp;quot;total active = &amp;quot; + activeCount);

threads = new Thread[activeCount];
System.out.println(&amp;quot;after&amp;quot;);
Thread.enumerate(threads);
for (int i=0; i&amp;lt;threads.length; i++) {
 System.out.println(threads[i].toString());
}
</pre>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.entroducing.com%2Fview%2Fprinting-out-active-threads-in-java&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.entroducing.com/view/printing-out-active-threads-in-java/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

