[go-nuts] Re: gopl ch8 ex8.14, Go Chat server that allows client names

2023-07-07 Thread Tong Sun
Oh, please disregard my question -- I've figured it out. On Friday, July 7, 2023 at 6:28:32 PM UTC-4 Tong Sun wrote: > For the chapter 8 of the book "The Go Programming Language": > > https://github.com/adonovan/gopl.io/tree/master/ch8/chat > > The exercise 8.14 is about using names instead of ne

[go-nuts] gopl ch8 ex8.14, Go Chat server that allows client names

2023-07-07 Thread Tong Sun
For the chapter 8 of the book "The Go Programming Language": https://github.com/adonovan/gopl.io/tree/master/ch8/chat The exercise 8.14 is about using names instead of network addresses to identify clients, and I'm having problem with how to implement it. I searched for "answers/solutions" on t

[go-nuts] Re: Misleading documentation for time.Timer?

2023-07-07 Thread Johan Bolmsjö
Hi, I understand how it works and I confess this is very pedantic. It's the word "single" in the sentence "Timer type represents a single event" in the description of the Timer type that I object to. If event corresponds to either the function given to AfterFunc or sending the time of expiry to

[go-nuts] Re: How to run extra routine for http server properly ?

2023-07-07 Thread Brian Candler
If it's an important business task which needs to take place even if the machine crashes, then maybe you want to post a request into a persistent message queue (e.g. NATS, Kafka) before returning to the user. The task can then be picked up by a separate worker process. On Friday, 7 July 2023 at

[go-nuts] Re: How to run extra routine for http server properly ?

2023-07-07 Thread alex-coder
Yes, the question is set too broadly, it is necessary to specify the context, thank you. четверг, 6 июля 2023 г. в 02:33:18 UTC+3, ben...@gmail.com: > For simple things, you can fire up a goroutine to do the "something else" > after the request finishes. For example, I've used this before to