4.0.0 Beta 1
Pre-releaseUsers of 3.x
should be able to update to 4.x
without code changes unless their application did one of the following:
- Defined a custom
File
implementation - Initialized
ParallelFilesystemDriver
with a custom worker count.
Breaking Changes
This release adds a lock()
, tryLock()
, and unlock()
to the File
interface. These methods provide a non-blocking means of locking and unlocking a file.
File::lock()
: Non-blocking method to obtain a shared or exclusive lock on the file. This method must only return once the lock has been obtained.File::tryLock()
: Makes a single non-blocking attempt to obtain a shared or exclusive lock on the file. Returns true if the lock was obtained, otherwise false.File::unlock()
: Unlocks the file if the lock is currently held.
In 3.x
, the constructor of ParallelFilesystemDriver
accepted an optional WorkerPool
and a number of workers to use from that pool. In 4.x
, instead the constructor now requires only an optional LimitedWorkerPool
(a new pool is created if one is not provided). The number of workers used for opening files is determined by the value returned from LimitedWorkerPool::getWorkerLimit()
. Use a DelegateWorkerPool
if you wish to use an existing pool and limit the number of workers used from the pool to open files. In general, it is not necessary to customize the parallel filesystem driver.
Full Changelog: v3.2.0...v4.0.0-beta.1