Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • What language/platform are you currently using? Some platforms have mechanisms already built-in to handle this sort of thing. Commented Mar 5, 2020 at 20:20
  • I'm using C++11. Commented Mar 5, 2020 at 20:22
  • stackoverflow.com/q/15752659 Commented Mar 5, 2020 at 20:23
  • 2
    @WillieTaylor Showing a more concise example of your code and tagging the question with the actual language used would be helpful to receive better answers here. Commented Mar 5, 2020 at 20:43
  • 2
    If you have a small number of tags, just map each tag value to a particular thread. This will guarantee that items with the same tag are serialized. Commented Mar 5, 2020 at 21:40