steipete/InterposeKit

globalWatchers.append & filtering not synced via globalWatcherQueue

zrzka opened this issue · 2 comments

zrzka commented

Quickly checked the code and I'm wondering ...

Global image watcher utilizes the globalWatcherQueue queue to filter globalWatchers:

InterposeWatcher.globalWatcherQueue.sync {

But there's another place where this queue isn't used, access to globalWatchers is not synced:

InterposeWatcher.globalWatchers.append(self)

Additional thing is that the globalWatchers.append(self) should be probably replaced by the InterposeWatcher.append(...) to encapsulate this whole watching stuff (globalWatchers).

Hey there! Thanks for writing an issue! 👋' first issue

Spot on! Fixing...