Re: [go-nuts] Linux File descriptor question in golang

2016-07-21 Thread Alex Bligh
ile descriptor number. This is irrespective of programming language used. Consider what happens if you open a file, then unlink it. Or open it then rename it. Or open a file with multiple links to it. Etc. -- Alex Bligh -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Alex Bligh
mutex per file then, and make your write() lock the correct mutex. Note that if you have a map of mutexes, you may also need to protect that map with a mutex, but that only needs protecting whilst you access the map with the possibility of a concurrent write; however, be aware of the danger of lock

Re: [go-nuts] Prevent RTS from creating an OS thread

2016-07-02 Thread Alex Bligh
On 2 Jul 2016, at 05:23, Matt Harden <matt.har...@gmail.com> wrote: > Forking is not safe in Go either. Why? Let's assume one knows what one is doing and doesn't try to use channels etc. -- Alex Bligh -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Prevent RTS from creating an OS thread

2016-07-01 Thread Alex Bligh
>>> problem. Maybe I'm missing something? >> >> You aren't missing anything. Doing this correctly requires runtime >> support, and that support does not exist. It's not even obvious how >> to write it, at least not to me. >> >> Ian > >

Re: [go-nuts] A proposal for generic in go

2016-06-21 Thread Alex Bligh
bility of K type items); however, it's also possible to perform stupidity with existing go syntax. The question is whether generics encourage it. -- Alex Bligh -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from t