Skip to content

Consider using inotify in Linux instead of polling for file changes #40

@jessezamora

Description

@jessezamora

I only mention this because in reading the documentation, the default method of reloading the config files for JSON and YAML is by polling:

https://swiftpackageindex.com/apple/swift-configuration/0.1.1/documentation/configuration/using-reloading-providers

Might I suggest using inotify in Linux, and perhaps the equivalent file watching methods under Windows and macOS in future updates? We already use Inotify in a home-grown library we created that is similar to swift-configuration, so it's totally possible. Example:

https://github.com/orobio/swift-configuration-reader/blob/main/Sources/ConfigurationReader/ConfigurationFileWatching/watchFile.swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-designNeeds further discussion and a concrete proposal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions