Skip to content

New API #4

@kolmodin

Description

@kolmodin

Thinking of a new API for version 0.4.

The current callback based API has several weaknesses, including silently dropping exceptions from the user's callback code which several users has noticed.

A new API could look something like this:

inotify :: IO INotify
addInotify :: INotify -> [EventVariety] -> FilePath -> IO WatchDescriptor
readEvents :: INotify -> IO [Event]

It'd be without background threads, without channels, thus much simpler.
Event overflow would be left to the linux kernel.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions