Re: How to parse C#, javascript, lisp source code for quoted literal strings

2014-05-24 Thread Christian Walde
Do not use a single regex for this and instead build a proper parser with mgc parsing. You can check this module for prior art along those lines: https://metacpan.org/source/MITHALDU/Locale-Simple-0.017/lib/Locale/Simple/Scraper/Parser.pm It is based on Parser::MGC, which is very useful for

How to implement locks/gates/semaphores to alleviate race conditions?

2014-05-24 Thread siegfried
I have multiple processes running cygwin/bash that are accessing the same files in a certain directory.I want to create a lock or semaphore or gate to serialize access to this directory so that no two (or more processes) can access the directory at any one time. As soon as the first process

Re: How to implement locks/gates/semaphores to alleviate race conditions?

2014-05-24 Thread Jim Gibson
On May 24, 2014, at 9:40 AM, siegfr...@heintze.com wrote: I have multiple processes running cygwin/bash that are accessing the same files in a certain directory. I want to create a lock or semaphore or gate to serialize access to this directory so that no two (or more processes) can

Re: How to implement locks/gates/semaphores to alleviate race conditions?

2014-05-24 Thread Shawn H Corey
On Sat, 24 May 2014 09:40:24 -0700 siegfr...@heintze.com wrote: Can someone recommend a way to do this in perl or python? How would I do this? I can think of several ways and they all sound difficult See `perldoc -f flock` http://perldoc.perl.org/functions/flock.html I'm not sure Windows can