Skip to content

Commit 334653a

Browse files
committed
Update comments
1 parent 39bd8e4 commit 334653a

File tree

1 file changed

+4
-0
lines changed
  • examples/singleapp/map_is_not_threadsafe/race

1 file changed

+4
-0
lines changed

examples/singleapp/map_is_not_threadsafe/race/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// マップ操作 はスレッドセーフでは無いというのを示すサンプルです。
22
// 本サンプルはデータ競合が発生しています。
33
//
4+
// Go本家のFAQにもmap操作はatomicでは無いですよと記載がある。
5+
// - https://go.dev/doc/faq#atomic_maps
6+
//
47
// REFERENCES:
8+
// - https://go.dev/doc/faq#atomic_maps
59
// - https://stackoverflow.com/questions/44152988/append-not-thread-safe
610
// - https://stackoverflow.com/questions/49879322/can-i-concurrently-write-different-slice-elements
711
package main

0 commit comments

Comments
 (0)