Effective Go

Remote Procedure Call

Why is thread so important?

I/O concurrency. Allowing activities waiting and proceeding

Parallelism. Use all of the cores on your machine

Convenience. Daemon thread.

  • fire a goroutine and send heartbeat pack

OR event-driven programming. (Asyncronous)

One problem with the scheme is that is a little bit pain to program.

And it’s not parallelized.