Topic: [proposal] concurrent hash map


Author: "Sergey A. Murylev" <sergeymurylev@gmail.com>
Date: Sat, 17 Dec 2016 21:50:10 +0300
Raw View
This is a multi-part message in MIME format.
--------------C2A0D418893A17B70D4A1B57
Content-Type: text/plain; charset=UTF-8

There are many tools for multithreading applications in STL but most of
the are rather low-level and they are require relatively high level of
understanding multithreading systems. In practice most of our tasks can
be solved by a small set of well known solutions. I propose to add high
scalable hash map that is able to work under high load from many threads
to STL.

Actually we can take a regular hash table and guard it with a mutex from
race conditions. But in this case we will be not able to make concurrent
access to hash table contents. In more details the concept described
here <https://www.ibm.com/developerworks/library/j-jtp08223/>

I've made a STL compatible implementation and posted the sources
togithub <https://github.com/BlazingPhoenix/concurrent-hash-map>.

The implementation duplicates unordered_map type interface and allows to
make mutithreaded code as simple as regular.

You can see an example of usage below:

#include "concurrent_hash_map.hpp" #include <string> #include <iostream>
concurrent_unordered_map*<*std*::*string*,*int*>* m*;*
m*.*insert*(*std*::*make_pair*(*"abc"*,*123*));*
m*[*"abc"*] +=*4*;*
std*::*cout*<<* m*[*"abc"*] <<* std*::*endl*;*

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%40gmail.com.

--------------C2A0D418893A17B70D4A1B57
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <p>
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf=
-8">
    </p>
    <p style=3D"margin-top: 0px; color: rgb(0, 0, 0); font-family:
      &quot;Source Sans Pro&quot;, sans; font-size: 20px; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px;">There are many tools for
      multithreading applications in STL but most of the are rather
      low-level and they are require relatively high level of
      understanding multithreading systems. In practice most of our
      tasks can be solved by a small set of well known solutions. I
      propose to add high scalable hash map that is able to work under
      high load from many threads to STL.<br>
    </p>
    <p style=3D"margin-top: 0px; color: rgb(0, 0, 0); font-family:
      &quot;Source Sans Pro&quot;, sans; font-size: 20px; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px;">Actually we can take a regular
      hash table and guard it with a mutex from race conditions. But in
      this case we will be not able to make concurrent access to hash
      table contents. In more details the concept described <a
        href=3D"https://www.ibm.com/developerworks/library/j-jtp08223/">her=
e</a><br>
    </p>
    <p style=3D"color: rgb(0, 0, 0); font-family: &quot;Source Sans
      Pro&quot;, sans; font-size: 20px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px;">I've made a STL compatible
      implementation and posted the sources to<span
        class=3D"Apple-converted-space"> </span><a
        href=3D"https://github.com/BlazingPhoenix/concurrent-hash-map"
        style=3D"text-decoration: none; color: rgb(2, 12, 126);
        transition: color 0.2s ease-out;">github</a>.</p>
    <p style=3D"color: rgb(0, 0, 0); font-family: &quot;Source Sans
      Pro&quot;, sans; font-size: 20px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px;">The implementation duplicates
      unordered_map type interface and allows to make mutithreaded code
      as simple as regular.<br>
    </p>
    <p style=3D"color: rgb(0, 0, 0); font-family: &quot;Source Sans
      Pro&quot;, sans; font-size: 20px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px;">You can see an example of usage
      below:<br>
    </p>
    <style type=3D"text/css">
..comment { color: #999999; font-style: italic; }
..pre { color: #000099; }
..string { color: #009900; }
..char { color: #009900; }
..float { color: #996600; }
..int { color: #999900; }
..bool { color: #000000; font-weight: bold; }
..type { color: #FF6633; }
..flow { color: #FF0000; }
..keyword { color: #990000; }
..operator { color: #663300; font-weight: bold; }
..operator { color: #663300; font-weight: bold; }
</style>
    <pre><font color=3D"#000099">#include "concurrent_hash_map.hpp"
#include &lt;string&gt;
#include &lt;iostream&gt;
</font>
concurrent_unordered_map<b><font color=3D"#663300">&lt;</font></b>std<b><fo=
nt color=3D"#663300">::</font></b>string<b><font color=3D"#663300">,</font>=
</b><font color=3D"#FF6633"> int</font><b><font color=3D"#663300">&gt;</fon=
t></b> m<b><font color=3D"#663300">;</font></b>
m<b><font color=3D"#663300">.</font></b>insert<b><font color=3D"#663300">(<=
/font></b>std<b><font color=3D"#663300">::</font></b>make_pair<b><font colo=
r=3D"#663300">(</font></b><font color=3D"#009900">"abc"</font><b><font colo=
r=3D"#663300">,</font></b><font color=3D"#999900"> 123</font><b><font color=
=3D"#663300">));</font></b>
m<b><font color=3D"#663300">[</font></b><font color=3D"#009900">"abc"</font=
><b><font color=3D"#663300">] +=3D</font></b><font color=3D"#999900"> 4</fo=
nt><b><font color=3D"#663300">;</font></b>
std<b><font color=3D"#663300">::</font></b>cout<b><font color=3D"#663300"> =
&lt;&lt;</font></b> m<b><font color=3D"#663300">[</font></b><font color=3D"=
#009900">"abc"</font><b><font color=3D"#663300">] &lt;&lt;</font></b> std<b=
><font color=3D"#663300">::</font></b>endl<b><font color=3D"#663300">;</fon=
t></b></pre>
  </body>
</html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%=
40gmail.com</a>.<br />

--------------C2A0D418893A17B70D4A1B57--

.


Author: Dawid Pilarski <dawidpicpp@gmail.com>
Date: Mon, 19 Dec 2016 08:59:41 +0100
Raw View
--001a1143b9605e06c20543fe4dde
Content-Type: text/plain; charset=UTF-8

I agree.

I think also thread-safe queue using atomic accesses is a good idea to have
(it's used so often). Do you also think it's worth to implement one? I
could try to prepare proposal for such a queue, if no proposal exists yet.

2016-12-17 19:50 GMT+01:00 Sergey A. Murylev <sergeymurylev@gmail.com>:

> There are many tools for multithreading applications in STL but most of
> the are rather low-level and they are require relatively high level of
> understanding multithreading systems. In practice most of our tasks can be
> solved by a small set of well known solutions. I propose to add high
> scalable hash map that is able to work under high load from many threads to
> STL.
>
> Actually we can take a regular hash table and guard it with a mutex from
> race conditions. But in this case we will be not able to make concurrent
> access to hash table contents. In more details the concept described here
> <https://www.ibm.com/developerworks/library/j-jtp08223/>
>
> I've made a STL compatible implementation and posted the sources to github
> <https://github.com/BlazingPhoenix/concurrent-hash-map>.
>
> The implementation duplicates unordered_map type interface and allows to
> make mutithreaded code as simple as regular.
>
> You can see an example of usage below:
>
> #include "concurrent_hash_map.hpp"
> #include <string>
> #include <iostream>
> concurrent_unordered_map*<*std*::*string*,* int*>* m*;*
> m*.*insert*(*std*::*make_pair*(*"abc"*,* 123*));*
> m*[*"abc"*] +=* 4*;*
> std*::*cout* <<* m*[*"abc"*] <<* std*::*endl*;*
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-
> 48c3-e4150b77e8ca%40gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagKcPiUL%2BzWdUE-G-g1TEdfcDkWs_n6uAAJkEOQ%40mail.gmail.com.

--001a1143b9605e06c20543fe4dde
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I agree.<br><div><br>I think also thread-safe queue using =
atomic accesses is a good idea to have (it&#39;s used so often). Do you als=
o think it&#39;s worth to implement one? I could try to prepare proposal fo=
r such a queue, if no proposal exists yet.<br></div></div><div class=3D"gma=
il_extra"><br><div class=3D"gmail_quote">2016-12-17 19:50 GMT+01:00 Sergey =
A. Murylev <span dir=3D"ltr">&lt;<a href=3D"mailto:sergeymurylev@gmail.com"=
 target=3D"_blank">sergeymurylev@gmail.com</a>&gt;</span>:<br><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <p>
     =20
    </p>
    <p style=3D"margin-top:0px;color:rgb(0,0,0);font-family:&quot;Source Sa=
ns Pro&quot;,sans;font-size:20px;font-style:normal;font-variant-ligatures:n=
ormal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;tex=
t-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px">There are many tools for
      multithreading applications in STL but most of the are rather
      low-level and they are require relatively high level of
      understanding multithreading systems. In practice most of our
      tasks can be solved by a small set of well known solutions. I
      propose to add high scalable hash map that is able to work under
      high load from many threads to STL.<br>
    </p>
    <p style=3D"margin-top:0px;color:rgb(0,0,0);font-family:&quot;Source Sa=
ns Pro&quot;,sans;font-size:20px;font-style:normal;font-variant-ligatures:n=
ormal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;tex=
t-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px">Actually we can take a regular
      hash table and guard it with a mutex from race conditions. But in
      this case we will be not able to make concurrent access to hash
      table contents. In more details the concept described <a href=3D"http=
s://www.ibm.com/developerworks/library/j-jtp08223/" target=3D"_blank">here<=
/a><br>
    </p>
    <p>I&#39;ve made a STL compatible
      implementation and posted the sources to<span class=3D"m_175753292095=
6086596Apple-converted-space"> </span><a href=3D"https://github.com/Blazing=
Phoenix/concurrent-hash-map" style=3D"text-decoration:none;color:rgb(2,12,1=
26)" target=3D"_blank">github</a>.</p>
    <p>The implementation duplicates
      unordered_map type interface and allows to make mutithreaded code
      as simple as regular.<br>
    </p>
    <p>You can see an example of usage
      below:<br>
    </p>
   =20
    <pre><font color=3D"#000099">#include &quot;concurrent_hash_map.hpp&quo=
t;
#include &lt;string&gt;
#include &lt;iostream&gt;
</font>
concurrent_unordered_map<b><font color=3D"#663300">&lt;</font></b>std<b><fo=
nt color=3D"#663300">::</font></b><wbr>string<b><font color=3D"#663300">,</=
font></b><font color=3D"#FF6633"> int</font><b><font color=3D"#663300">&gt;=
</font></b> m<b><font color=3D"#663300">;</font></b>
m<b><font color=3D"#663300">.</font></b>insert<b><font color=3D"#663300">(<=
/font></b>std<b><font color=3D"#663300">::</font></b>make_pair<b><font colo=
r=3D"#663300">(</font></b><font color=3D"#009900">&quot;abc&quot;</font><b>=
<font color=3D"#663300">,</font></b><font color=3D"#999900"> 123</font><b><=
font color=3D"#663300">));</font></b>
m<b><font color=3D"#663300">[</font></b><font color=3D"#009900">&quot;abc&q=
uot;</font><b><font color=3D"#663300">] +=3D</font></b><font color=3D"#9999=
00"> 4</font><b><font color=3D"#663300">;</font></b>
std<b><font color=3D"#663300">::</font></b>cout<b><font color=3D"#663300"> =
&lt;&lt;</font></b> m<b><font color=3D"#663300">[</font></b><font color=3D"=
#009900">&quot;abc&quot;</font><b><font color=3D"#663300">] &lt;&lt;</font>=
</b> std<b><font color=3D"#663300">::</font></b>endl<b><font color=3D"#6633=
00">;</font></b></pre><span class=3D"HOEnZb"><font color=3D"#888888">
  </font></span></div><span class=3D"HOEnZb"><font color=3D"#888888">


<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%=
40gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">h=
ttps://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/52b59=
3f9-b6c9-e355-<wbr>48c3-e4150b77e8ca%40gmail.com</a>.<br>
</font></span></blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagKcPiUL%2BzWdUE-G-g1TEdf=
cDkWs_n6uAAJkEOQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagK=
cPiUL%2BzWdUE-G-g1TEdfcDkWs_n6uAAJkEOQ%40mail.gmail.com</a>.<br />

--001a1143b9605e06c20543fe4dde--

.


Author: Sergey Murylev <sergeymurylev@gmail.com>
Date: Mon, 19 Dec 2016 11:04:52 +0300
Raw View
--001a1145baeee933db0543fe5f75
Content-Type: text/plain; charset=UTF-8

Hi Dawid,

There is a proposal for concurrent queue p0260r0
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0260r0.html>. As
far as I know it is included into boost.
<http://www.boost.org/doc/libs/1_58_0/doc/html/thread/sds.html#thread.sds.synchronized_queues>

2016-12-19 10:59 GMT+03:00 Dawid Pilarski <dawidpicpp@gmail.com>:

> I agree.
>
> I think also thread-safe queue using atomic accesses is a good idea to
> have (it's used so often). Do you also think it's worth to implement one? I
> could try to prepare proposal for such a queue, if no proposal exists yet.
>
> 2016-12-17 19:50 GMT+01:00 Sergey A. Murylev <sergeymurylev@gmail.com>:
>
>> There are many tools for multithreading applications in STL but most of
>> the are rather low-level and they are require relatively high level of
>> understanding multithreading systems. In practice most of our tasks can be
>> solved by a small set of well known solutions. I propose to add high
>> scalable hash map that is able to work under high load from many threads to
>> STL.
>>
>> Actually we can take a regular hash table and guard it with a mutex from
>> race conditions. But in this case we will be not able to make concurrent
>> access to hash table contents. In more details the concept described here
>> <https://www.ibm.com/developerworks/library/j-jtp08223/>
>>
>> I've made a STL compatible implementation and posted the sources to
>> github <https://github.com/BlazingPhoenix/concurrent-hash-map>.
>>
>> The implementation duplicates unordered_map type interface and allows to
>> make mutithreaded code as simple as regular.
>>
>> You can see an example of usage below:
>>
>> #include "concurrent_hash_map.hpp"
>> #include <string>
>> #include <iostream>
>> concurrent_unordered_map*<*std*::*string*,* int*>* m*;*
>> m*.*insert*(*std*::*make_pair*(*"abc"*,* 123*));*
>> m*[*"abc"*] +=* 4*;*
>> std*::*cout* <<* m*[*"abc"*] <<* std*::*endl*;*
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> To view this discussion on the web visit https://groups.google.com/a/is
>> ocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-
>> e4150b77e8ca%40gmail.com
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagKcPiUL%2BzWdUE-
> G-g1TEdfcDkWs_n6uAAJkEOQ%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagKcPiUL%2BzWdUE-G-g1TEdfcDkWs_n6uAAJkEOQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACYD1LKo3QdFkNFQo9hNbdCyW8ZdkCH%3D7JXF_fEqbctu2m3yHQ%40mail.gmail.com.

--001a1145baeee933db0543fe5f75
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Dawid,<br><br></div>There is a proposal for concur=
rent queue <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/20=
16/p0260r0.html">p0260r0</a>. As far as I know it is included into <a href=
=3D"http://www.boost.org/doc/libs/1_58_0/doc/html/thread/sds.html#thread.sd=
s.synchronized_queues">boost.</a><br></div><div class=3D"gmail_extra"><br><=
div class=3D"gmail_quote">2016-12-19 10:59 GMT+03:00 Dawid Pilarski <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:dawidpicpp@gmail.com" target=3D"_blank">da=
widpicpp@gmail.com</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div d=
ir=3D"ltr">I agree.<br><div><br>I think also thread-safe queue using atomic=
 accesses is a good idea to have (it&#39;s used so often). Do you also thin=
k it&#39;s worth to implement one? I could try to prepare proposal for such=
 a queue, if no proposal exists yet.<br></div></div><div class=3D"gmail_ext=
ra"><br><div class=3D"gmail_quote"><div><div class=3D"h5">2016-12-17 19:50 =
GMT+01:00 Sergey A. Murylev <span dir=3D"ltr">&lt;<a href=3D"mailto:sergeym=
urylev@gmail.com" target=3D"_blank">sergeymurylev@gmail.com</a>&gt;</span>:=
<br></div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"h5">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <p>
     =20
    </p>
    <p style=3D"margin-top:0px;color:rgb(0,0,0);font-family:&quot;Source Sa=
ns Pro&quot;,sans;font-size:20px;font-style:normal;font-variant-ligatures:n=
ormal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;tex=
t-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px">There are many tools for
      multithreading applications in STL but most of the are rather
      low-level and they are require relatively high level of
      understanding multithreading systems. In practice most of our
      tasks can be solved by a small set of well known solutions. I
      propose to add high scalable hash map that is able to work under
      high load from many threads to STL.<br>
    </p>
    <p style=3D"margin-top:0px;color:rgb(0,0,0);font-family:&quot;Source Sa=
ns Pro&quot;,sans;font-size:20px;font-style:normal;font-variant-ligatures:n=
ormal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;tex=
t-align:start;text-indent:0px;text-transform:none;white-space:normal;word-s=
pacing:0px">Actually we can take a regular
      hash table and guard it with a mutex from race conditions. But in
      this case we will be not able to make concurrent access to hash
      table contents. In more details the concept described <a href=3D"http=
s://www.ibm.com/developerworks/library/j-jtp08223/" target=3D"_blank">here<=
/a><br>
    </p>
    <p>I&#39;ve made a STL compatible
      implementation and posted the sources to<span class=3D"m_268740056045=
3652039m_1757532920956086596Apple-converted-space"> </span><a href=3D"https=
://github.com/BlazingPhoenix/concurrent-hash-map" style=3D"text-decoration:=
none;color:rgb(2,12,126)" target=3D"_blank">github</a>.</p>
    <p>The implementation duplicates
      unordered_map type interface and allows to make mutithreaded code
      as simple as regular.<br>
    </p>
    <p>You can see an example of usage
      below:<br>
    </p>
   =20
    <pre><font color=3D"#000099">#include &quot;concurrent_hash_map.hpp&quo=
t;
#include &lt;string&gt;
#include &lt;iostream&gt;
</font>
concurrent_unordered_map<b><font color=3D"#663300">&lt;</font></b>std<b><fo=
nt color=3D"#663300">::</font></b><wbr>string<b><font color=3D"#663300">,</=
font></b><font color=3D"#FF6633"> int</font><b><font color=3D"#663300">&gt;=
</font></b> m<b><font color=3D"#663300">;</font></b>
m<b><font color=3D"#663300">.</font></b>insert<b><font color=3D"#663300">(<=
/font></b>std<b><font color=3D"#663300">::</font></b>make_pair<b><font colo=
r=3D"#663300">(</font></b><font color=3D"#009900">&quot;abc&quot;</font><b>=
<font color=3D"#663300">,</font></b><font color=3D"#999900"> 123</font><b><=
font color=3D"#663300">));</font></b>
m<b><font color=3D"#663300">[</font></b><font color=3D"#009900">&quot;abc&q=
uot;</font><b><font color=3D"#663300">] +=3D</font></b><font color=3D"#9999=
00"> 4</font><b><font color=3D"#663300">;</font></b>
std<b><font color=3D"#663300">::</font></b>cout<b><font color=3D"#663300"> =
&lt;&lt;</font></b> m<b><font color=3D"#663300">[</font></b><font color=3D"=
#009900">&quot;abc&quot;</font><b><font color=3D"#663300">] &lt;&lt;</font>=
</b> std<b><font color=3D"#663300">::</font></b>endl<b><font color=3D"#6633=
00">;</font></b></pre><span class=3D"m_2687400560453652039HOEnZb"><font col=
or=3D"#888888">
  </font></span></div></div></div><span class=3D"HOEnZb"><font color=3D"#88=
8888"><span class=3D"m_2687400560453652039HOEnZb"><font color=3D"#888888">


<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isoc<wbr>pp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/52b593f9-b6c9-e355-48c3-e4150b77e8ca%=
40gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">h=
ttps://groups.google.com/a/is<wbr>ocpp.org/d/msgid/std-proposals<wbr>/52b59=
3f9-b6c9-e355-48c3-<wbr>e4150b77e8ca%40gmail.com</a>.<br>
</font></span></font></span></blockquote></div><span class=3D"HOEnZb"><font=
 color=3D"#888888"><br></font></span></div><span class=3D"HOEnZb"><font col=
or=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAOkZZiGmnHWagKcPiUL%2BzWdUE-G-g1TEdf=
cDkWs_n6uAAJkEOQ%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r" target=3D"_blank">https://groups.google.com/a/<wbr>isocpp.org/d/msgid/st=
d-<wbr>proposals/<wbr>CAOkZZiGmnHWagKcPiUL%2BzWdUE-<wbr>G-g1TEdfcDkWs_n6uAA=
JkEOQ%<wbr>40mail.gmail.com</a>.<br>
</font></span></blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CACYD1LKo3QdFkNFQo9hNbdCyW8ZdkCH%3D7J=
XF_fEqbctu2m3yHQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CACYD1LKo3QdFkN=
FQo9hNbdCyW8ZdkCH%3D7JXF_fEqbctu2m3yHQ%40mail.gmail.com</a>.<br />

--001a1145baeee933db0543fe5f75--

.