<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sleeping vs. Yielding</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx</link><description>According to the BOL, the recommended way of yielding to other workers in SQLCLR is to call System.Thread.Sleep(0). Long before Yukon shipped, I had a conversation with a coworker who was responsible for knowing something about SQLCLR, and I asked how</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title> Ken Henderson s WebLog Sleeping vs Yielding | debt consolidator</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#9755079</link><pubDate>Mon, 15 Jun 2009 23:01:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9755079</guid><dc:creator> Ken Henderson s WebLog Sleeping vs Yielding | debt consolidator</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://mydebtconsolidator.info/story.php?id=11530"&gt;http://mydebtconsolidator.info/story.php?id=11530&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9755079" width="1" height="1"&gt;</description></item><item><title> Ken Henderson s WebLog Sleeping vs Yielding | Insomnia Cure</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#9742585</link><pubDate>Sat, 13 Jun 2009 09:53:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9742585</guid><dc:creator> Ken Henderson s WebLog Sleeping vs Yielding | Insomnia Cure</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://insomniacuresite.info/story.php?id=217"&gt;http://insomniacuresite.info/story.php?id=217&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9742585" width="1" height="1"&gt;</description></item><item><title>re: Sleeping vs. Yielding</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#1434880</link><pubDate>Mon, 08 Jan 2007 20:17:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1434880</guid><dc:creator>SKV</dc:creator><description>&lt;p&gt;So, after How can I &amp;nbsp;yield CPU to another thread?&lt;/p&gt;
&lt;p&gt;I like idea about better system design but I am given the system that relys on it.&lt;/p&gt;
&lt;p&gt;How about this: I need to detect locking situations with Crititcal sections. I have to try to enter critical section and yeild control for x ms if it is taken. After some timeout period I report error... What is the best way to yeild control:&lt;/p&gt;
&lt;p&gt;1. SwitchThread - bypass low priority threads :(&lt;/p&gt;
&lt;p&gt;2. Sleep(0) &amp;lt;=&amp;gt; &amp;nbsp;SwitchThread bypass low priority threads :( &lt;/p&gt;
&lt;p&gt;3. Sleep(1) &amp;lt;- Less then OS time quant&lt;/p&gt;
&lt;p&gt;4. Sleep(15) &amp;lt;- OS time quant ??? (OS/CPU dependent)&lt;/p&gt;
&lt;p&gt;5. Other&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1434880" width="1" height="1"&gt;</description></item><item><title>Links of the Week</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#581661</link><pubDate>Sun, 23 Apr 2006 19:32:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:581661</guid><dc:creator>Jeff W. Barnes</dc:creator><description>Comparison of AJAX frameworks for ASP.NET &lt;br&gt;Extending CodeSmith merge functionality &lt;br&gt;Good read on SQLCLR...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=581661" width="1" height="1"&gt;</description></item><item><title>Bob Beauchemin - Poking at SQLCLR </title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#560042</link><pubDate>Fri, 24 Mar 2006 19:23:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:560042</guid><dc:creator>Professional Association for SQL Server (PASS) SIG</dc:creator><description>&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=560042" width="1" height="1"&gt;</description></item><item><title>Links of the Week</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#553170</link><pubDate>Thu, 16 Mar 2006 23:30:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:553170</guid><dc:creator>Jeff Barnes - MCSD</dc:creator><description>Comparison of AJAX frameworks for ASP.NET &lt;br&gt;Extending CodeSmith merge functionality &lt;br&gt;Good read on SQLCLR...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=553170" width="1" height="1"&gt;</description></item><item><title>Ken Henderson - Sleeping vs. Yielding </title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#526304</link><pubDate>Tue, 07 Feb 2006 07:36:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:526304</guid><dc:creator>Professional Association for SQL Server (PASS) SIG</dc:creator><description>&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=526304" width="1" height="1"&gt;</description></item><item><title>Links of the Week</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#524146</link><pubDate>Fri, 03 Feb 2006 19:37:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:524146</guid><dc:creator>Jeff Barnes - MCSD</dc:creator><description>&lt;br&gt;Comparison of AJAX frameworks for ASP.NET &lt;br&gt;Extending CodeSmith merge functionality &lt;br&gt;Good read on...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=524146" width="1" height="1"&gt;</description></item><item><title>re: Sleeping vs. Yielding</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#523780</link><pubDate>Fri, 03 Feb 2006 06:42:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:523780</guid><dc:creator>Dean Harding</dc:creator><description>It was more a suggestion that instead of Sleep(0) (or yielding or whatever) you'd generally be better off using proper synchronization primitives, rather they relying on the scheduler to schedule your task in a &amp;quot;deterministic&amp;quot; way.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=523780" width="1" height="1"&gt;</description></item><item><title>re: Sleeping vs. Yielding</title><link>http://blogs.msdn.com/b/khen1234/archive/2006/02/02/523623.aspx#523716</link><pubDate>Fri, 03 Feb 2006 04:46:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:523716</guid><dc:creator>MSDNArchive</dc:creator><description>You're right -- I've fixed the links.&lt;br/&gt;&lt;br/&gt;As to your question, I'm not sure I follow it.  I'm especially tired at the moment, so maybe it's just me.  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=523716" width="1" height="1"&gt;</description></item></channel></rss>