{"image_url":null,"author_name":"ema_hiro","blog_title":"emahiro/b.log","provider_url":"https://hatena.blog","version":"1.0","type":"rich","height":"190","author_url":"https://blog.hatena.ne.jp/ema_hiro/","title":"semaphore \u3092\u4f7f\u3063\u3066 goroutine \u306e\u8d77\u52d5\u6570\u3092 Go \u304b\u3089\u6392\u4ed6\u5236\u5fa1\u3059\u308b","blog_url":"https://ema-hiro.hatenablog.com/","url":"https://ema-hiro.hatenablog.com/entry/2024/08/12/154543","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fema-hiro.hatenablog.com%2Fentry%2F2024%2F08%2F12%2F154543\" title=\"semaphore \u3092\u4f7f\u3063\u3066 goroutine \u306e\u8d77\u52d5\u6570\u3092 Go \u304b\u3089\u6392\u4ed6\u5236\u5fa1\u3059\u308b - emahiro/b.log\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2024-08-12 15:45:43","width":"100%","description":"Overview sync package \u5185\u306b\u3042\u308b semaphore \u3092\u4f7f\u3063\u3066 Go \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u3067 goroutine \u306e\u8d77\u52d5\u6570\u3092\u6392\u4ed6\u5236\u5fa1\u3057\u307e\u3059\u3002 Go \u306e\u4e26\u884c\u51e6\u7406\u306e\u8d77\u52d5\u6570\u3092\u5236\u5fa1\u3059\u308b\u306e\u306f \u4f7f\u3044\u65b9 https://pkg.go.dev/golang.org/x/sync/semaphore#section-documentation \u306e\u30b5\u30f3\u30d7\u30eb\u306b\u3042\u308b\u5b9f\u88c5\u65b9\u6cd5\u306b\u6e96\u62e0\u3059\u308b\u3060\u3051\u3067OK\u3067\u3059\u3002 // goroutine \u306e\u4e0a\u9650\u3092\u6307\u5b9a\u3059\u308b\u3002 var maxConcurrentNum int64 = 20 sem := semaphore.NewWeighted(maxConcurrentNum\u2026","provider_name":"Hatena Blog","categories":["Go"]}