-
tetsu_koba
- 5435
- 0
- 2
- 2
![](https://s.togetter.com/static/web/img/placeholder.gif)
罠を踏み抜きまくったプロダクト / stf-storage/go-stf-server - github.com/stf-storage/go… #golangstudy
2014-08-09 17:13:18![](https://s.togetter.com/static/web/img/placeholder.gif)
#golangstudy 「goroutineがいつどのスレッドで実行されるかはruntimeまかせ。実感として協調的マルチタスクに近い。」
2014-08-09 17:14:41![](https://s.togetter.com/static/web/img/placeholder.gif)
#golangstudy 「goroutineのIDがとれない。つまりThread Local Storageのようなものが作れない。」
2014-08-09 17:15:46![](https://s.togetter.com/static/web/img/placeholder.gif)
"defer は first-in-last-out。最初に書いた奴が最後に実行される。" #golangstudy
2014-08-09 17:18:39![](https://s.togetter.com/static/web/img/placeholder.gif)
この話 YAPC では Any::Event との違いとか交えて話してもらえると嬉しいかも #golangstudy
2014-08-09 17:19:07![](https://s.togetter.com/static/web/img/placeholder.gif)
終了を通知する場合は close(ch) するのもいい(closeはch待ってるすべてのgoroutineに通知される) #golangstudy
2014-08-09 17:22:32![](https://s.togetter.com/static/web/img/placeholder.gif)
#golangstudy とりあえずブロックを回避するにはそこだけ新たなgoroutineで実行すればよい。(つまり身代わりを立てる。)
2014-08-09 17:22:52![](https://s.togetter.com/static/web/img/placeholder.gif)
"os.Exit() and log.Fatalf() are evil" --> deferが走らない #golangstudy
2014-08-09 17:27:18![](https://s.togetter.com/static/web/img/placeholder.gif)
“channelにchannelを渡す”という表現によって、channelとは一体何者なのかということがよくわからなくなった感。再勉強が必要そう。 #golangstudy
2014-08-09 17:28:00