Otherwise it can easily happen that the pad is destroyed before the thread disappears, as happened sometimes in the test_pad_probe_block_add_remove test where joining of the thread was done after the pad was unreffed and destroyed.
Fixes #339 (closed)