Preliminary work towards threads on win32