GithubHelp home page GithubHelp logo

Comments (6)

ppknap avatar ppknap commented on June 11, 2024

This is not a platform-dependent issue and should be handled by your runtime's implementation. Sorry @rjeczalik, but without a fix I cannot move things forward.

from notify.

rjeczalik avatar rjeczalik commented on June 11, 2024

There's already work on this here 6221e74. The end result is every Watcher implementation is initialised by NewWatcher, meaning inotify, fsevents etc. implement func newWatcher() Watcher.

The fact inotify is half-global now does not help, since there's not way to control the moment of initialisation. For tests there'll be no default runtime initialized.

It would help if all inotify context could be bound to inotify struct.

from notify.

ppknap avatar ppknap commented on June 11, 2024

If you want to have one object which handles all watched directories it's better to use it since a very beginning of the implementation. It should be possible to run multiple tests (even with t.Parallel()) on one watcher/runtime instance. Or, did I miss something when you were speaking about including "newWatcher" to the public interface;>

from notify.

rjeczalik avatar rjeczalik commented on June 11, 2024

Actually nvm, it will work despite what I said. I'll send PR in couple of minutes.

from notify.

rjeczalik avatar rjeczalik commented on June 11, 2024

@ppknap see #29 and ok me when no issue with merging it

from notify.

ppknap avatar ppknap commented on June 11, 2024

LGTM 💛

from notify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.