---
title: asynchronousMetadataFlush()
framework: fskit
role: symbol
role_heading: Instance Method
path: fskit/fsblockdeviceresource/asynchronousmetadataflush()
---

# asynchronousMetadataFlush()

Asynchronously flushes the resource’s buffer cache.

## Declaration

```swift
func asynchronousMetadataFlush() throws
```

## Discussion

Discussion This method schedules a flush of data previously written with delayedMetadataWriteFrom:startingAt:length:error: to the resource and returns immediately without blocking. This method doesn’t wait to check the flush’s status. If an error prevents the flush from being scheduled, the error is indicated by the in-out error parameter.

## See Also

### Reading and writing data with kernel buffer cache

- [metadataRead(into:startingAt:length:)](fskit/fsblockdeviceresource/metadataread(into:startingat:length:).md)
- [metadataWrite(from:startingAt:length:)](fskit/fsblockdeviceresource/metadatawrite(from:startingat:length:).md)
- [delayedMetadataWrite(from:startingAt:length:)](fskit/fsblockdeviceresource/delayedmetadatawrite(from:startingat:length:).md)
- [metadataFlush()](fskit/fsblockdeviceresource/metadataflush().md)
- [metadataClear(_:withDelayedWrites:)](fskit/fsblockdeviceresource/metadataclear(_:withdelayedwrites:).md)
- [metadataPurge(_:)](fskit/fsblockdeviceresource/metadatapurge(_:).md)
- [FSMetadataRange](fskit/fsmetadatarange.md)
