Stop BackgroundProcessor's thread on drop
authorJeffrey Czyz <jkczyz@gmail.com>
Sun, 18 Jul 2021 18:11:01 +0000 (13:11 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Sun, 18 Jul 2021 18:11:01 +0000 (13:11 -0500)
commit4f05db6af84d76597d0cd0a03c6a00ec825fc7bf
treee84fd948695c4fbd90c7a38630fb074af78b4064
parentd9fa8f1c3872a32d107ac2e5630d6c3922bf9cc9
Stop BackgroundProcessor's thread on drop

Without stopping the thread when BackgroundProcessor is dropped, it will
run free. In the context of language bindings, it is difficult to know
how long references held by the thread should live. Implement Drop to
stop the thread just as is done when explicitly calling stop().
lightning-background-processor/src/lib.rs