christoff-buerger / racr

Metacompiler library supporting incremental transformation based on reference attribute grammar controlled rewriting.
MIT License
30 stars 9 forks source link

thread-safe temporary file creation #94

Closed christoff-buerger closed 3 years ago

christoff-buerger commented 3 years ago

The create-temporary.bash script for creation of temporary files (cf. #89) still has to apply file locks (cf. #93) to become thread-safe.

Its current race-condition when several instances are run in parallel is that two instances yield the same absolute temporary file path (very unlikely but possible), such that only a single temporary is created but returned by more than one of the running script applications.

christoff-buerger commented 3 years ago

Implemented and tested.