Re: [go-nuts] Re: I don't know about callbacks in Golang

2018-05-07 Thread matthewjuran
The first approach with a func argument to a func can be synchronous (which is what I was thinking at the time) or it could be asynchronous by using the go keyword on the callback. Matt On Monday, May 7, 2018 at 11:48:20 AM UTC-5, florent giraud wrote: > > ok matthew so what you propose is sync

Re: [go-nuts] Re: I don't know about callbacks in Golang

2018-05-07 Thread florent giraud
ok matthew so what you propose is sync method callback right ? 2018-05-07 17:24 GMT+02:00 : > Corrected mistake: > > func SignalsCallback(arg1 int, arg2 string, callback chan<- struct{}) > > SignalsCallback will only write to callback, not read. > > Matt > > On Monday, May 7, 2018 at 10:08:27 AM

Re: [go-nuts] Re: I don't know about callbacks in Golang

2018-05-07 Thread florent giraud
Hello louki. Can you give us a little example about what you mean. I don't really understand this sentence for me "don't share state to communicate, communicate to share state." Thanks a lot for all your answears 2018-05-07 9:03 GMT+02:00 Louki Sumirniy : > To use callbacks in Go you must follow

Re: [go-nuts] Re: I don't know about callbacks in Golang

2018-05-07 Thread Linker
Callback let user to handle context Coroutine let runtime to handle context On Mon, May 7, 2018 at 3:03 PM, Louki Sumirniy < louki.sumirniy.stal...@gmail.com> wrote: > To use callbacks in Go you must follow Functional Programming rules about > shared data. In simple terms, you cannot sh