<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sfujiwara</author_name>
  <author_url>https://blog.hatena.ne.jp/sfujiwara/</author_url>
  <blog_title>酒日記 はてな支店</blog_title>
  <blog_url>https://sfujiwara.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>goroutine は GOMAXPROCS &gt;= 2 の場合は OS の thread も使って動くので、 そもそもgoroutineはスレッドじゃない。 そう、goroutineはスレッドじゃない。Big Sky :: 非同期UI この部分はちょっと誤解を招くかもなあと思いました。実際に複数の goroutine から共有変数を書き換えるようなコードを GOMAXPROCS &gt;= 2 で動かすと、衝突したりします。 package main import ( &quot;runtime&quot;; &quot;fmt&quot;; ) func main() { incr(1); incr(2); } func incr(pr…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsfujiwara.hatenablog.com%2Fentry%2F20091231%2F1262223995&quot; title=&quot; goroutine は OS thread も使う - 酒日記 はてな支店&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-12-31 10:46:35</published>
  <title> goroutine は OS thread も使う</title>
  <type>rich</type>
  <url>https://sfujiwara.hatenablog.com/entry/20091231/1262223995</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
