3 ms·
Yeah, I’m thinking of ownership as exclusive access handed off in sync, and disposal as one more duty of the final owner. I would feel a lot more comfortable w
by erik_seaberg 3y ago
Yeah, I’m thinking of ownership as exclusive access handed off in sync, and disposal as one more duty of the final owner.
I would feel a lot more comfortable with channels if a linter would verify that every message is either mutex protected or a newly created graph (maybe a deep copy) never accessed again by the sender. Go already does some escape analysis to minimize heap allocations, but doesn’t flag a goroutine receiving nested maps or array slices that may be shared.