sync#
Flush pending writes from a mapped scalar back to disk.
Σύνοψη#
sync $map; # synchronous - wait for the kernel to finish
sync $map, 0; # asynchronous - queue the flush and return
Ορίσματα#
$lvalue- a currently mapped scalar.$synchronous- defaults to true. When true,syncdoes not return until the kernel reports the data on stable storage. When false, the flush is only queued.
The mapping is always flushed automatically when the scalar goes out of scope, so explicit calls to sync are only needed when you want other processes, or a crash-safe on-disk snapshot, to see the changes before then.
Οριακές περιπτώσεις#
Calling
syncon an unmapped scalar raises an exception.Calling
syncon an empty mapping is a no-op.
Διαφορές από το upstream#
Fully compatible with upstream File::Map 0.71.
Δείτε επίσης#
unmap- release the mapping (also triggers a flush).advise- influence the kernel’s write-back strategy.