add macros THREAD_ADAPTOR and THREAD_ADAPTOR_WITH_DATAOBJ