Its a fairly basic programming job, depending on how many degrees your 4th axis is capable of rotating in one command. There is often an arbitrary limit on how far some controllers will permit a A axis move, for example 9999 degrees.
To cut a single turn of a 10 pitch thread:
G01 X0.100 A360
You can control right or left handedness by the direction of X motion (sign), but for your A axis direction or rotation, you'll probably want to climb mill, and this can be easily modified by the sign of A.
I'd imagine that to be productive, you'd want to use a plain style milling cutter (akin to a slitting saw), and this would require that you have a right angle attachment for a VMC. Your cutter axis would then be horizontal like the workpiece, and almost parallel to it. This right angle head would also need to be rotated slightly around the vertical spindle axis to bring the plane of the cutter to match the helix angle of the thread.
First you get good, then you get fast. Then grouchiness sets in.
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)