Changes

Jump to navigation Jump to search
51 bytes added ,  15:53, 27 February 2020
no edit summary
In the following module, lock annotations are used to prevent concurrent write operations on the same file:
<pre classsyntaxhighlight lang="brush:xquery">
module namespace config = 'config';
file:write-text('config.txt', $data)
};
</presyntaxhighlight>
Some explanations:
Local locks can also be declared via pragmas:
<pre classsyntaxhighlight lang="brush:xquery">
(# basex:write-lock CONFIG #) {
file:write('config.xml', <config/>)
}
</presyntaxhighlight>
Locks for the functions of a module can be assigned via option declarations:
<pre classsyntaxhighlight lang="brush:xquery">
declare option basex:write-lock 'CONFIG';
file:write('config.xml', <config/>)
</presyntaxhighlight>
===Java Modules===
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu