Project

Profile

Help

Bug #5130

closed

`saxon:discard-document()` should be synchronized

Added by Michael Kay over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-10-15
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 11, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

The extension function saxon:discard-document() makes multiple updates to data held by the Controller, in particular the document pool and the list of unavailable documents. The method should be synchronized in case there are multiple simultaneous calls to saxon:discard-document() in different threads.

Ideally we should also provide a function that combines the effect of doc() and discard-document() -- and perhaps doc-available() -- all within a single call having atomic effect, but meanwhile simply synchronising discard-document() will remove some potential dangers.

(This is relevant only when transformations are executing in multiple threads, typically as a result of using xsl:result-document).


Related issues

Related to Saxon - Support #5124: Unexpected error "Cannot read a document that was written during the same transformation" - race conditionClosedMichael Kay2021-10-13

Actions

Please register to edit this issue

Also available in: Atom PDF