草庐IT

go - 为什么 goroutine 没有身份

我刚接触golang,正在阅读gopl一书中的示例。TheGoProgrammingLanguage一书的第9.8.4节解释了为什么Goroutines没有程序员可以访问的身份概念Goroutineshavenonotionofidentitythatisaccessibletotheprogrammer.Thisisbydesign,sincethread-localstoragetendstobeabused.Forexample,inawebserverimplementedinalanguagewiththread-localstorage,it’scommonformanyf