From: Francis Cianfrocca Date: 2006-08-15T01:45:08+09:00 Subject: Re: [OT] Re: How do you use flock and clean up lock files? On 8/14/06, gwtmp01@mac.com wrote: > > On Aug 14, 2006, at 6:44 AM, Francis Cianfrocca wrote: > > It's heavyweight, but so what? Nothing is heavier than a process, > > which is what you're trying to sync in the first place. > > Hmm. One of the hallmarks of the Unix philosophy was/is the idea that > processes are 'cheap'. > > I tend to think that people gravitate towards a threading solution a > little > too reflexively these days and then get bitten by all sorts of > concurrency > issues that can often be avoided via cooperating processes. > > The Plan 9 papers offer some interesting insight into the process/thread > dichotomy. > > > Gary Wright > > > > > Hmm, you were responding to me so I thought I should clarify. One of the questions upthread was about Windows, not Plan 9. On Unix just use flock for process sync. On Windows there is a useable cross-process mutex. As far as threads are concerned, I bow to no one in my disdain for them. (But I've been programming threaded apps since Win32 was in beta, so I think I'm qualified to disdain them.)