Provides co-operative exclusive file access.
This is typically used for files that might be shared between Gradle instances.
Constructor and description |
---|
ExclusiveFileAccess
(int timeoutMs, int pollIntervalMs) Create exclusive access guard and monitor. |
Create exclusive access guard and monitor.
timeoutMs
- Time (in milliseconds) to wait for a file to become available before giving up.pollIntervalMs
- Polling interval (in milliseconds).Lock access to a file and perform action.
onFile
- File to wait for & lock access to.runner
- Actions to execute whilst access is held.Lock access to a file and perform action.
onFile
- File to wait for & lock access to.runner
- Actions to execute whilst access is held.