Also hide public constructor and wrap common use cases as atomic operation to avoid race condition in jhead native codes.