[go-nuts] Re: Snapshot data with Go

2018-09-16 Thread Tamás Gulácsi
Create your key-value store in mmap - like coreos/boltdb. 2018. szeptember 16., vasárnap 5:44:18 UTC+2 időpontban Kasun Vithanage a következőt írta: > > I'm developing a *redis **like *server with Go. You can see the code repo > here . > I need to dump my *Mutex

Re: [go-nuts] Re: Snapshot data with Go

2018-09-16 Thread Peter Mogensen
On 09/16/2018 12:12 PM, Kasun Vithanage wrote: > Yes, forking is done using the OS. I was thinking of a workaround with go > The reason this works in (say) redis, is the copy-on-write feature of the kernel you get with the fork. You would have to implement all this in userspace to make a workar

[go-nuts] Re: Snapshot data with Go

2018-09-16 Thread Kasun Vithanage
Yes, forking is done using the OS. I was thinking of a workaround with go On Sunday, September 16, 2018 at 2:24:03 PM UTC+5:30, Lei Ni wrote: > > I am trying to do the same, but according to my understanding you can't do > that in Golang. When fork is called on Linux, the duplicated child process

[go-nuts] Re: Snapshot data with Go

2018-09-16 Thread Lei Ni
I am trying to do the same, but according to my understanding you can't do that in Golang. When fork is called on Linux, the duplicated child process is created with only one thread - the thread that called fork. This basically means your child process no longer has a working Go runtime/environ