Skip to Content
Go: Building Web Applications
book

Go: Building Web Applications

by Nathan Kozyra, Mat Ryer
August 2016
Beginner to intermediate
665 pages
14h 11m
English
Packt Publishing
Content preview from Go: Building Web Applications

Managing threads

So far, you've probably noticed that thread management is not a matter that requires the programmer's utmost concern in Go. This is by design. Goroutines aren't tied to a specific thread or threads that are handled by Go's internal scheduler. However, this doesn't mean that you neither have access to the threads nor the ability to control what individual threads do. As you know, you can already tell Go how many threads you have (or wish to use) by using GOMAXPROCS. We also know that using this can introduce asynchronous issues as it pertains to data consistency and execution order.

At this point, the main issue with threads is not how they're accessed or utilized, but how to properly control execution flow to guarantee that your ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Full Stack Development with Go

Hands-On Full Stack Development with Go

Mina Andrawos

Publisher Resources

ISBN: 9781787123496