4 ms·
Is it correct to assume that the "cancellation" part of `Context` is similar to C#'s `CancellationToken`? Also, it looks like it allows to pass some "implicit p
by valcron1000 3y ago
Is it correct to assume that the "cancellation" part of `Context` is similar to C#'s `CancellationToken`? Also, it looks like it allows to pass some "implicit parameters" to another function. If that's the case, why does Go have a single entity performing two roles: cancellation + implicit parameter passing? I would expect to have these things separated.
- valcron1000 3y agoI also find it curious that a language with a preemptive scheduler requires manual "yield" points by constantly checking on the context if the current function should stop executing.