| Property | Value |
|---|---|
| Native Name | FLUSH_RESOURCE_KVP |
| Hash | 0xE27C97A0 |
| Return Type | void |
| API Set | server |
Description: Nonsynchronous operations will not wait for a disk/filesystem flush before returning from a write or delete call. They will be much faster than their synchronous counterparts (e.g., bulk operations), however, a system crash may lose the data to some recent operations.
This native ensures all _NO_SYNC operations are synchronized with the disk/filesystem.
Examples
-- Bulk write many <key, value> pairs to the resource KVP.
local key = "bug_%d"
local value = "unintended_feature_%d"
for i=1,10000 do
SetResourceKvpNoSync(key:format(i), value:format(i))
end
-- Ensure all data is synchronized to the filesystem
FlushResourceKvp()