View Single Post
  #2  
Old 09-02-2010, 02:06 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
Global macro changes made by other instances of Visual Build are reloaded before each step.
http://www.kinook.com/VisBuildPro/Ma...obalmacros.htm

However, this is not an atomic/interlocked update, so near-simultaneous changes made by one instance could overwrite those of another (both could read value x, increment to x+1 and save instead of ending up at x+2), and file in use errors could occur with several simultaneous instances all updating global macros at once.

To implement a true atomic update, one way might be to call a program that opens a common file for exclusive access (waiting+retrying if already in use), then reads+updates the value in the file, and closes the file and returns the value. I don't believe this can be done with the scripting FileSystemObject and may require something like C# or C.
Reply With Quote