Just don't bother with a 40 pitch tap. That was for back in the day when guys had to match the gap with a file and wanted to cut as little as possible. Since you have a lathe and can fit the gap with that just use 32 or something like that. They're cheaper, easier to find and last longer.