changed markedly since
2014 when that issue was opened & closed.
--
Alex Bligh
--
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 g
iptor 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
&q
; given as argument)
... or more idiomatically, set up a channel per file you are writing, make
write() write to that channel, and have a writer go-routine which reads from
that channel and writes to the file itself.
--
Alex Bligh
--
You received this message because you are subscribed to the Googl
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
inversion.
On 2 Jul 2016, at 05:23, Matt Harden 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
"gola
ing?
>>
>> 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
>
> --
> You received this message because you a
"frameworks" is
unfair. It would actually have made the application code (i.e. the library
user) far easier to read.
Of course it's possible to generate foolish uses (I would however note in
passing that even with KeyValuePair things might not be as simple as you think,
as