Changes

Jump to navigation Jump to search
329 bytes added ,  08:23, 24 June 2020
{{Mark|Updated with Version 9.4:}} Single annotation for read and write locks.
By default, a Java function will be executed in parallel with other code. If a Java function performs sensitive operations, it is advisable to explicitly lock the code. This  ===Java Locks=== Java provides numerous ways of to synchronize the execution of code. In simple cases, the {{Code|synchronized}} keyword can be realized used. For more complex scenarios, Lock and Semaphor and Atomic classes exist. ===XQuery Locks=== If you want to synchronize the execution of your code with a lock BaseX locks, you can take advantage of the {{Code|@Lock}} annotation:
<syntaxhighlight lang="java">
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu