Deleted original message, since I wrote it to myself and to an outside observer it might have sounded passive-aggressive.
It would be nice to automatically reload changed config. My first thought to do it was like in haskell: have an observer thread and an executor thread, and upon detecting changes the observer kills and restarts the executor. The problem is that without haskell runtime this needs to be done with forks and linux signals, which is not great and sort of unsafe.
My second thought was a canonical unrolling of async exceptions into flags. The executor thread is a pipeline from an endless gesture producer. So if it stops producing upon a boolean flag, the thread dies, which is easy. The boolean doesn't even need to be atomic or correctly read-write ordered (unsafe in rust, but safe in reality). The problem with that is that it's kind of spaghetti, and the fact that the pipeline is badly documented. It's spaghetti and undocumented because I was thinking of haskell-conduit when I wrote it and it made a lot of sense in my head. Do I need to refactor it?
Deleted original message, since I wrote it to myself and to an outside observer it might have sounded passive-aggressive.
It would be nice to automatically reload changed config. My first thought to do it was like in haskell: have an observer thread and an executor thread, and upon detecting changes the observer kills and restarts the executor. The problem is that without haskell runtime this needs to be done with forks and linux signals, which is not great and sort of unsafe.
My second thought was a canonical unrolling of async exceptions into flags. The executor thread is a pipeline from an endless gesture producer. So if it stops producing upon a boolean flag, the thread dies, which is easy. The boolean doesn't even need to be atomic or correctly read-write ordered (unsafe in rust, but safe in reality). The problem with that is that it's kind of spaghetti, and the fact that the pipeline is badly documented. It's spaghetti and undocumented because I was thinking of haskell-conduit when I wrote it and it made a lot of sense in my head. Do I need to refactor it?