Disabling processes from within a function

I dont think it is good idea to kill one thread from another thread. This creates lots of confusion in future.
If possible Id suggest you take our the disable THREAD_1; statement from THREAD_2 and move it out from fork/join_none. Most of the cases you can change your logic to work in this way.