split thread to posix & win