the case of a leaky goroutine: fix paragraph nl

This commit is contained in:
Wouter Groeneveld 2024-03-23 13:41:35 +01:00
parent 51c401246d
commit 893126b10b
1 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,7 @@ tags:
- go
---
In the programming language Go, it's _very_ easy to program something using high-level concurrent patterns thanks to the concept of _Goroutines_ and channels used to signal between them. A Goroutine is essentially a coroutine that maps onto green threads that map onto real native threads on your OS in an `NxM` way. The simple `go func()` prepend-style syntax makes fire-and-forget Goroutines for executing small tasks in parallel trivial.
In the programming language Go, it's _very_ easy to build something using high-level concurrent patterns thanks to the concept of _Goroutines_ and channels used to signal between them. A Goroutine is essentially a coroutine that maps onto green threads that map onto real native threads on your OS in an `NxM` way. The simple `go func()` prepend-style syntax makes fire-and-forget Goroutines for executing small tasks in parallel trivial.
Or is it? If we are to believe Katherine Cox-Buday, the author of O'Reilly's [Concurrency In Go](https://katherine.cox-buday.com/concurrency-in-go/), it's not:
@ -35,8 +35,6 @@ Once you managed to get your profile dump, you can analyze it with `go tool ppro
Let's get back to that context that's never truly cancelled. This piece of code is the perpetrator:
enkel een context. In plaats van verder te werken op die context door middel van context.WithCancel(...) gebruikten wij de volgende func om die omvorming te doen:
```go
func ToDoneInterface(done <-chan struct{}) <-chan interface{} {