Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread 'Reinhard Luediger' via golang-nuts
Not Tested sofar by myself but https://github.com/dc0d/goroutines seems to hide all the complexity in a nice streamlined API. Am Montag, 19. März 2018 08:46:07 UTC+1 schrieb Sathish VJ: > > Looks like this last one works but also quite complicated. > > One question ... what is the effect of hav

Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread 'Reinhard Luediger' via golang-nuts
Well, without the NOP (empty) default case the loop of the working routine gets blocked by reading from the cancelation channel. So whenever you want to get a non blocking channel operation wether read or write remember the select with an empty default ;) kind regards Reinhard Am Montag, 19.

Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread 'Reinhard Luediger' via golang-nuts
Because then you have to deal with all the chennels by yourself. Using the Context API looks for me a bit cleaner and even easier. Am Montag, 19. März 2018 15:04:17 UTC+1 schrieb matthe...@gmail.com: > > Only a detail, but why not this instead as the API? > > func LongRunningTask(cancel <-chan st

[go-nuts] go1.10.windows-386.msi have securityalert in ESET

2018-03-19 Thread yohan0822ster
when install go1.10.windows-386.msi、eset do security alert. does this have solved problem? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...

Re: [go-nuts] evacuate in hashmap: where to put when migrate data from oldbucket to bucket

2018-03-19 Thread lizhiyuan66
I think i have got it, thank you all -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://gr

Re: [go-nuts] implementation of sync.atomic primitives

2018-03-19 Thread Ian Lance Taylor
On Mon, Mar 19, 2018 at 5:46 AM, shivaram via golang-nuts wrote: > > 2. The property that word-sized values are not subject to > interleaving/tearing is an implementation detail, rather than a guarantee of > the Go memory model? My impression is that that is guaranteed by the Go memory model. Bu

Re: [go-nuts] implementation of sync.atomic primitives

2018-03-19 Thread 'Keith Randall' via golang-nuts
On Monday, March 19, 2018 at 9:30:39 AM UTC-7, thepud...@gmail.com wrote: > > Hi Ian, > > I know you were not giving any type of definitive treatise on how go > treats atomics across different processors... > > but is a related aspect restricting instruction reordering by the compiler > itself?

[go-nuts] [ANN] New version 1.2! laitos brings new enhancements to the only software solution that let you be in touch with your Linux computer at all times via telephone, SMS, and satellite terminals

2018-03-19 Thread Houzuo Guo
New Version! laitos v1.2 brings new enhancements to the only software solution that let you be in touch with your Linux computer at all times via telephone, SMS, and satellite terminals: Open-source project URL: https://github.com/HouzuoGuo/laitos Latest release: https://github.com/HouzuoGuo/la

Re: [go-nuts] implementation of sync.atomic primitives

2018-03-19 Thread thepudds1460
Hi Ian, I know you were not giving any type of definitive treatise on how go treats atomics across different processors... but is a related aspect restricting instruction reordering by the compiler itself? I don't know what the modern go compiler does at this point, but I think at least circa

Re: [go-nuts] implementation of sync.atomic primitives

2018-03-19 Thread thepudds1460
Hi Shivaram, Regarding the memory model definition and sync/atomic, there is this github issue that you likely would be interested in: issue #5045 "doc: define how sync/atomic interacts with memory model" Including this comment: = h

Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread matthewjuran
Only a detail, but why not this instead as the API? func LongRunningTask(cancel <-chan struct{}, index int) (err error) { Matt On Monday, March 19, 2018 at 7:43:19 AM UTC-5, rog wrote: > > Why not something more like this? https://play.golang.org/p/3t4UtoFkoIt > > A lot of this comes down to wh

[go-nuts] Re: Flutter and golang

2018-03-19 Thread matthewjuran
> > I gave up matching the native OS. It's futile and just way too much work. Don't kill me but it's really down to your philosophy in the end. I’m asking because I’ve only done a web interface (where a cross-browser standardization library is useful for me), but I’ve used plenty of apps/pro

Re: [go-nuts] Closing os.Stdin while trying to read from it?

2018-03-19 Thread Alex Efros
Hi! On Mon, Mar 19, 2018 at 05:52:52AM -0700, Matt Mueller wrote: > Is it possible to programmatically tell os.Stdin that we've reached EOF > while you're trying to read from it? As default os.Stdin is in blocking mode then only way to have it read EOF after calling Read() on it is to actually p

Re: [go-nuts] Closing os.Stdin while trying to read from it?

2018-03-19 Thread Matt Mueller
Thanks for the great info! Out of curiosity, how is Go handling ctrl+d (sending EOF to stdin) right now? Is it part of the special case? A more generic way to ask this is: Is it possible to programmatically tell os.Stdin that we've reached EOF while you're trying to read from it? On Friday,

Re: [go-nuts] implementation of sync.atomic primitives

2018-03-19 Thread shivaram via golang-nuts
Thanks, this was very helpful. If I understand correctly: 1. These ordering guarantees are part of the Go memory model? I couldn't find explicit descriptions of them in these pages: https://golang.org/ref/mem https://golang.org/pkg/sync/atomic/ 2. The property that word-sized values are not sub

Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread roger peppe
Why not something more like this? https://play.golang.org/p/3t4UtoFkoIt A lot of this comes down to what that long running task is doing. If it's hard at work doing computational work, the polling approach might be appropriate. If it's mostly waiting on external events then passing the context ins

Re: [go-nuts] Best practices for package maintainers

2018-03-19 Thread Vitor De Mario
I'll keep an eye on it. Thanks for the heads up, so far all edits have been helpful. On Mon, Mar 19, 2018 at 5:10 AM Jan Mercl <0xj...@gmail.com> wrote: > On Mon, Mar 19, 2018 at 1:24 AM Vitor De Mario > wrote: > > > It is a public document, open to any comments and edits. > > Such documents ten

Re: [go-nuts] Best practices for package maintainers

2018-03-19 Thread Jan Mercl
On Mon, Mar 19, 2018 at 1:24 AM Vitor De Mario wrote: > It is a public document, open to any comments and edits. Such documents tend to not live for long. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

Re: [go-nuts] Re: Long running task in select case

2018-03-19 Thread Sathish VJ
Looks like this last one works but also quite complicated. One question ... what is the effect of having "default" on line 24 as empty? On 18 March 2018 at 14:21, 'Reinhard Luediger' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I came to the following solution for my long running ta

[go-nuts] Re: Flutter and golang

2018-03-19 Thread Ged Wed
It's a horses for courses situation Matt. I can live with Material design everywhere with a customised there so I emget the same branded corporate look everywhere. I gave up matching the native OS. It's futile and just way too much work. Don't kill me but it's really down to your philosophy in