Is golang.org/x/text/message's Printer thread safe?

106 views
Skip to first unread message

Xiangrong Fang

unread,
Apr 22, 2024, 5:23:30 AM4/22/24
to golang-nuts
Is golang.org/x/text/message's *message.Printer safe to use in goroutines?

Thanks.

Jan Mercl

unread,
Apr 22, 2024, 5:39:11 AM4/22/24
to Xiangrong Fang, golang-nuts
On Mon, Apr 22, 2024 at 11:23 AM Xiangrong Fang <xrf...@gmail.com> wrote:

> Is golang.org/x/text/message's *message.Printer safe to use in goroutines?

I don't know, but usually things are safe for concurrent use by
multiple goroutines only when explicitly documented as such.

Xiangrong Fang

unread,
Apr 22, 2024, 8:42:09 PM4/22/24
to Jan Mercl, golang-nuts
Thanks for the tip!



Jan Mercl <0xj...@gmail.com> 于2024年4月22日周一 17:38写道:
Reply all
Reply to author
Forward
0 new messages