Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 21 – Canais – 8. Context
Play lesson

Aprenda Go 🇧🇷 - Cap. 21 – Canais – 8. Context

5.0 (2)
47 learners

What you'll learn

This course includes

  • 21.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Aprenda Go 🇧🇷 Cap. 21 – Canais – 8. Context

Cap. 21 – Canais – 8. Context Transcript and Lesson Notes

- Só pra ter uma idéia geral: - Se a gente lança 500 goroutines pra fazer uma tarefa, e cancelamos a tarefa no meio do caminho, como fazemos pra matar as goroutines? - Documentação: https://golang.org/pkg/context/ - Aos

Quick Summary

- Só pra ter uma idéia geral: - Se a gente lança 500 goroutines pra fazer uma tarefa, e cancelamos a tarefa no meio do caminho, como fazemos pra matar as goroutines? - Documentação: https://golang.org/pkg/context/ - Aos

Key Takeaways

  • Review the core idea: - Só pra ter uma idéia geral: - Se a gente lança 500 goroutines pra fazer uma tarefa, e cancelamos a tarefa no meio do caminho, como fazemos pra matar as goroutines? - Documentação: https://golang.org/pkg/context/ - Aos
  • Understand how golang fits into Cap. 21 – Canais – 8. Context.
  • Understand how programar fits into Cap. 21 – Canais – 8. Context.
  • Understand how go fits into Cap. 21 – Canais – 8. Context.
  • Understand how programacao fits into Cap. 21 – Canais – 8. Context.

Key Concepts

Full Transcript

- Só pra ter uma idéia geral: - Se a gente lança 500 goroutines pra fazer uma tarefa, e cancelamos a tarefa no meio do caminho, como fazemos pra matar as goroutines? - Documentação: https://golang.org/pkg/context/ - Aos aventureiros: https://blog.golang.org/context - Destaques: - ctx := context.Background - ctx, cancel = context.WithCancel(context.Background) - goroutine: select case ←ctx.Done(): return; default: continua trabalhando. - check ctx.Err(); - Tambem tem WithDeadline/Timeout - Exemplos (Todd): - Analisando: - Background: https://play.golang.org/p/cByXyrxXUf - WithCancel: https://play.golang.org/p/XOknf0aSpx - Função Cancel: https://play.golang.org/p/UzQxxhn_fm - Exemplos práticos: - func WithCancel: https://play.golang.org/p/Lmbyn7bO7e - func WithCancel: https://play.golang.org/p/wvGmvMzIMW - func WithDeadline: https://play.golang.org/p/Q6mVdQqYTt - func WithTimeout: https://play.golang.org/p/OuES9sP_yX - func WithValue: https://play.golang.org/p/8JDCGk1K4P

Lesson FAQs

What is Cap. 21 – Canais – 8. Context about?

- Só pra ter uma idéia geral: - Se a gente lança 500 goroutines pra fazer uma tarefa, e cancelamos a tarefa no meio do caminho, como fazemos pra matar as goroutines? - Documentação: https://golang.org/pkg/context/ - Aos

What key concepts are covered in this lesson?

The lesson covers golang, programar, go, programacao, programação.

What should I learn before Cap. 21 – Canais – 8. Context?

Review the previous lessons in Aprenda Go 🇧🇷, then use the transcript and key concepts on this page to fill any gaps.

How can I practice after this lesson?

Practice by applying the main concepts: golang, programar, go, programacao.

Does this lesson include a transcript?

Yes. The full transcript is visible on this page in indexable HTML sections.

Is this lesson free?

Yes. CourseHive lessons and courses are available to learn online for free.

Continue Learning

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Lessons

Related Courses

FAQs

Course Hive
Download CourseHive and keep learning anywhere
Get App