gointermediate
Go Worker Goroutine Channel
Bounded concurrent worker reading jobs and sending results
By ApeType Staff·7 lines·137 characters·1,420 total attempts
package worker
func Worker(id int, jobs <-chan int, results chan<- int) {
for j := range jobs {
results <- j * 2
}
}
TRANSCRIBE
Ready when you are.
Test your muscle memory and transcription speed against this exact snippet.
Start Typing
Tip: Press Esc anytime to restart
Best runs on this snippet
| # | Typist | Acc | WPM |
|---|---|---|---|
| 1 | Mohammed Khalid | 100% | 94 |
| 2 | Mohammed Khalid | 100% | 94 |
| 3 | Abel Gideon | 99.24% | 66 |
| 4 | Abel Gideon | 99.24% | 66 |
| 5 | Abel Gideon | 97.73% | 59 |