Skip to content

Async File IO #1815

@LosFaul

Description

@LosFaul

Is your feature request related to a problem? Please describe.

It always bothered me that file operations can block the main thread and aren't async.
It would be great if file functions could be extended with async options.

Describe the solution you'd like

Async options for reading and writing:
fileRead([callback[, callbackArgsTbl], ] fileHandle, ...)
fileWrite([callback[, callbackArgsTbl], ] fileHandle, ...)

function onReadCallback(fileHandle, strRead, arg1, arg2, ...)

end

fileRead(onReadCallback, { arg1, arg2, ... }, fileHandle, ...)

Describe alternatives you've considered

using server modules is an option, but it would be great if it would be actually an inbuild solution in MTA

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions