test: use THREAD_* wrappers over pthread* in del_notify (cherry picked from commit 391003e9b78acff0ee5096c592fc4b601a02648d)