タグ

c++とtipsに関するfragarach_the_swordのブックマーク (2)

  • GitHub - google/styleguide: Style guides for Google-originated open-source projects

    Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style. “Style” covers a lot of ground, from “use camelCase for variable names” to “never use global variables” to “never use exceptions.” This project (google/stylegu

    GitHub - google/styleguide: Style guides for Google-originated open-source projects
    fragarach_the_sword
    fragarach_the_sword 2010/06/28
    google-styleguide - Google Code
  • マルチスレッドを安全に実行する

    はじめに この記事は、インドリ氏による『スレッドセーフとインテルTBBのコンテナ』に記載されている誤りを訂正することを目的としています。インドリ氏の記事では、TBBコンテナの紹介に注意するあまり、マルチスレッドプログラミングに潜む危険、その危険を取り除く方法についての記述が正しくありません。記事では、マルチスレッドプログラミングを安全に設計する方法を説明することを目的とします。 記事で用いるコードは、C言語に類似していますが、C言語ではありません。振る舞いを理解していただきやすくするための仮想言語です。実行できる環境はありません。 「競合」という問題 ここに、1つのリンゴがあります。そして、2人の人が、そのリンゴの前にいます。ここで2人に向かって「リンゴをべて良いですよ」とだけ言うと、どうなるでしょうか。お互いに譲り合うか、もしくは取り合いをするでしょう。ここで2人が仲良くリンゴにあ

    マルチスレッドを安全に実行する
    fragarach_the_sword
    fragarach_the_sword 2010/04/28
    マルチスレッドを安全に実行する(1/3):CodeZine
  • 1