Adjusted termination behavior according to thread-detach (either detach or exit).
Adjusted termination behavior according to thread-detach (either detach or exit).

hfp/libxstream,mjklemm/libxstream,hfp/libxstream,mjklemm/libxstream