To prevent a group of databases from being modified by other threads (other 'hits' to the server, or other templates or triggers), wrap an [ExclusiveLock] context around the WebDNA code which will be making the important exclusive changes.
Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):
The list of database names is first alphabetized so as to maintain a consistent locking order (a technique which prevents internal deadlocks), then each database lock is acquired one at a time until all locks are acquired, then the interior WebDNA is executed. If any lock cannot be acquired, the other databases are unlocked, and the interior WebDNA is not executed.
Parameter | Description |
---|---|
db
|
path to first database file, relative to this template. |
db
|
path to second database file, relative to this template. |
db
|
...path to nth database file, relative to this template. Note that all parameters are named exactly the same: "db" |