<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Java Wait() auch in C++]]></title><description><![CDATA[<p>Hallo!</p>
<p>In Java gibt es diese möglichkeit, um zu warten. ich verwende das oft bei threads in while-loops, so dass die cpu-auslastung nicht auf 100% hochschießt.</p>
<pre><code class="language-java">synchronized(this){
				try{
					((java.lang.Object)this).wait(1);
				}
				catch (InterruptedException exc){
					//do nothing
				}
			}
</code></pre>
<p>Gibt es eine ähnliche Funktionalität auch in C++?<br />
Grüße,</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/133218/java-wait-auch-in-c</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 19:04:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/133218.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Jan 2006 09:42:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Java Wait() auch in C++ on Mon, 16 Jan 2006 09:42:09 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>In Java gibt es diese möglichkeit, um zu warten. ich verwende das oft bei threads in while-loops, so dass die cpu-auslastung nicht auf 100% hochschießt.</p>
<pre><code class="language-java">synchronized(this){
				try{
					((java.lang.Object)this).wait(1);
				}
				catch (InterruptedException exc){
					//do nothing
				}
			}
</code></pre>
<p>Gibt es eine ähnliche Funktionalität auch in C++?<br />
Grüße,</p>
]]></description><link>https://www.c-plusplus.net/forum/post/967765</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/967765</guid><dc:creator><![CDATA[pixsta]]></dc:creator><pubDate>Mon, 16 Jan 2006 09:42:09 GMT</pubDate></item><item><title><![CDATA[Reply to Java Wait() auch in C++ on Mon, 16 Jan 2006 10:04:48 GMT]]></title><description><![CDATA[<p>In Standard-C++ nicht, aber je nach Betriebssystem gibt es Sleep(millisekunden) (Windows) oder sleep(sekunden) (UNIX).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/967787</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/967787</guid><dc:creator><![CDATA[CStoll (off)]]></dc:creator><pubDate>Mon, 16 Jan 2006 10:04:48 GMT</pubDate></item><item><title><![CDATA[Reply to Java Wait() auch in C++ on Mon, 16 Jan 2006 10:21:58 GMT]]></title><description><![CDATA[<p>danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/967800</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/967800</guid><dc:creator><![CDATA[pixsta]]></dc:creator><pubDate>Mon, 16 Jan 2006 10:21:58 GMT</pubDate></item></channel></rss>