3 ms·
Maybe I'm missing something but I don't understand why they choose to use a 'chan time.Time' instead of a 'chan struct{}'. Is there any advantage using a 'time
by nzach 5y ago
Maybe I'm missing something but I don't understand why they choose to use a 'chan time.Time' instead of a 'chan struct{}'.
Is there any advantage using a 'time.Time'? This is just a simplification to make the example less obscure? Or the change is so insignificant(%-wise) that it makes no sense to optimize for it?
- atombender 5y agoWhere do you see this? The article doesn't mention channels at all.
- nzach 5y agoIn the example they gave. Figure 11.
- atombender 5y agoAh — I didn't realize the code fragment was an image, so Cmd-F didn't find it. My guess is that this doesn't show all their logic. They talk about tracking the interval between each GC, so they might use the timestamp for that.