More threading helper macros