As promised, Apple has released iOS4, you should find it immediately available via software update in iTunes. If not, you can download the update direct here (thanks to Mac Stories):

This is a free update but only works with specific iPhone models:  iPhone 3G with no multitasking, iPhone 3GS, iPhone 4 and 2nd / 3rd generation iPod Touches.