|
|
|
|
|
by lemevi
3988 days ago
|
|
Do you think it would be fine to use a singleton if the writes are all happening in a single thread and it's not critical that the reads be synchronized? Sharing state across go routines seems like something to be avoided. In vanilla Java it's always not easy to avoid sharing state. |
|
The code you write is either thread-safe, used in a single-threaded context, or a pinless grenade.