If you’re planning to upgrade to iOS 4.0, there is in fact a jailbreak by the name of redsn0w available by the famous Dev-Team. redsn0w uses a bootrom exploit, and because of that, can’t be patched by Apple until they release new hardware. (The iPhone 4 will require a new exploit to be found.)
But don’t get excited yet, because redsn0w is targeted at the developers of jailbroken apps, and won’t be the most pleasant experience for the end user at the moment. iOS 4 comes with many changes that will break current jailbreak apps, a problem that wasn’t as prevalent in previous OS revisions. Winterboard, for example, will need a major overhaul to accommodate for the new filenames. The good news is that redsn0w works on iTunes 9.2, as this jailbreaking method bypasses iTunes.
The iOS 4.0 Golden Master is available for download to developers (or daring enthusiasts) but it is recommended that you wait until it is officially released, and all the bugs are worked out, until you jailbreak it.
For a full breakdown of what does and doesn’t work, see this thread by jmwerkus.