inseven / opolua

A compiled-OPL interpreter for iOS written in Lua
https://opolua.org
MIT License
12 stars 0 forks source link

Cancelling a `RecursiveDirectoryMonitor` observer doesn't guarantee it never receives callbacks #151

Closed jbmorley closed 2 years ago

jbmorley commented 2 years ago

While it shouldn't cause any bugs at the moment, we should consider making it a hard-and-fast guarantee that observers never receive callbacks once their cancel method returns.

jbmorley commented 2 years ago

I've now added isCancelled property to the context which can be used to track whenever an observer is cancelled to ensure that no further calls are made to the observer blocks.