<?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[Nochmal ne frage zu std::list und mutltithreading?]]></title><description><![CDATA[<p>Habe eine std::liste welche events enthält, jedes event hat eine attribut &quot;Abstand&quot;) zum davor liegenden event!</p>
<p>1. thread fügt event an/ein</p>
<p>2. thread liest IMMER nur das erste event, beabeitet es und löscht es dann!</p>
<p>der 1. thread darf nur events lesen und einfügen/anfügen, der 2.thread darf immer nur da erste event lesen und löschen..</p>
<p>geht das ohne syncronisierung gut, oder ist die threadsicherheit von std:list nicht gegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195160/nochmal-ne-frage-zu-std-list-und-mutltithreading</link><generator>RSS for Node</generator><lastBuildDate>Tue, 29 Sep 2026 21:16:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195160.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Oct 2007 04:27:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 04:27:34 GMT]]></title><description><![CDATA[<p>Habe eine std::liste welche events enthält, jedes event hat eine attribut &quot;Abstand&quot;) zum davor liegenden event!</p>
<p>1. thread fügt event an/ein</p>
<p>2. thread liest IMMER nur das erste event, beabeitet es und löscht es dann!</p>
<p>der 1. thread darf nur events lesen und einfügen/anfügen, der 2.thread darf immer nur da erste event lesen und löschen..</p>
<p>geht das ohne syncronisierung gut, oder ist die threadsicherheit von std:list nicht gegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385271</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Mon, 15 Oct 2007 04:27:34 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 07:17:47 GMT]]></title><description><![CDATA[<p>Wenn ich jetzt nichts übersehen habe, wär für dich std::queue schon fast besser geeignet, allerdings weiß ich weder bei queue noch bei list, ob man mit Threads arbeiten kann - das würd mich doch auchmal interessieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385312</guid><dc:creator><![CDATA[chris_phz]]></dc:creator><pubDate>Mon, 15 Oct 2007 07:17:47 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 07:21:50 GMT]]></title><description><![CDATA[<p>Queue selbst ist nur ein Adapter, von daher sagt das garnichts aus - eine Queue, die als darunterliegenden Container std::list verwendet, ist mindestens genauso thread(un-)safe wie eine std::list selbst <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385314</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Mon, 15 Oct 2007 07:21:50 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 07:31:30 GMT]]></title><description><![CDATA[<p>Es gibt zumindest ein list-Member, den beide Threads für ihre Arbeit verwenden - die Größenangabe size(). Von daher solltest du die Arbeit schon synchronisieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385319</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385319</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 15 Oct 2007 07:31:30 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 08:28:10 GMT]]></title><description><![CDATA[<p>hrm... eigentlich is es nix weiter als 1 mutex, den man locked und unlocked, so viel arbeit is es wirklich net, um den zugriff auf die liste zu geben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385345</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385345</guid><dc:creator><![CDATA[Vorden]]></dc:creator><pubDate>Mon, 15 Oct 2007 08:28:10 GMT</pubDate></item><item><title><![CDATA[Reply to Nochmal ne frage zu std::list und mutltithreading? on Mon, 15 Oct 2007 09:13:51 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>Habe eine std::liste welche events enthält, jedes event hat eine attribut &quot;Abstand&quot;) zum davor liegenden event!</p>
<p>1. thread fügt event an/ein</p>
<p>2. thread liest IMMER nur das erste event, beabeitet es und löscht es dann!</p>
<p>der 1. thread darf nur events lesen und einfügen/anfügen, der 2.thread darf immer nur da erste event lesen und löschen..</p>
<p>geht das ohne syncronisierung gut, oder ist die threadsicherheit von std:list nicht gegeben?</p>
</blockquote>
<p>Bedingung:<br />
- Liste mit einem Element.</p>
<p>T1 holt sich begin() oder end() zum lesen<br />
T1 wird unterbrochen<br />
T2 Holt sich begin() bearbeitet und löscht.<br />
T1 wird wieder ausgeführt, aber begin()/end() ist nicht mehr valid<br />
-&gt; rums!<br />
also kann es schief gehn.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385374</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385374</guid><dc:creator><![CDATA[b7f7]]></dc:creator><pubDate>Mon, 15 Oct 2007 09:13:51 GMT</pubDate></item></channel></rss>