memesearch
Don't Be Clever About Concurrency

Don't Be Clever About Concurrency

Download Find similar pictures
Text on the meme
Advice Programs that modify data being simultaneously accessed by multiple goroutines must serialize such access. To serialize access, protect the data with channel operations or other synchronization primitives such as those in the sync and sync/atomic packages. If you must read the rest of this document to understand the behavior of your program, you are being too clever. Don’t be clever.
What it means

A dark-themed programming advice card explains how to safely synchronize data accessed by multiple goroutines using channels and the sync packages. The punchline is that overly clever code is discouraged: if the documentation is needed to understand the behavior, the program is already too clever. It is used as a reaction to complicated or overengineered technical solutions. EN: A dark-themed programming advice card explains how to safely synchronize data accessed by multiple goroutines using channels and the sync packages. The punchline is that overly clever code is discouraged: if the documentation is needed to understand the behavior, the program is already too clever. It is used as a reaction to complicated or overengineered technical solutions.

Objects
Tags
Source
Type
image
Size
800×630 · 74.1 KiB
Mood
sarcastic, instructive
Language
en
Added