Utility code originally distributed as part of the Async CTP