Article Publishing
~ golang pid and file lock related
Todo: look into these projects

https://github.com/nightlyone/lockfile

Skeptical of this one because it is extremely simple and not much code:
https://github.com/nightlyone/lockfile/b...ockfile.go

What can it possibly do being that it is so few lines of code? If it works well, that would be great.

An interesting question: one locking system is designed for something, but can it be used for something else entirely not originally intended? For example say you have a race condition in a program, and a way to check for a race condition... could you not use that same check to lock a file or lock something entirely different you didn't originally design it for? I.e. someone creates a lock file for a thread so the other threads can check the file to see if there is a lock. But why just threads? why not also file sharing?

Threads/coroutines share, so can some of these utilities be used in file sharing too? It's all about sharing and avoiding conflicts, so why not reuse some of the systems?
Copyright © War Strategists, M.G. Consequences 2009-2017    Help! Edit Page