Typical usage is as follows:
let promise ← Promise.newcreates a promise
promise.result : Task αcan now be passed around
promise.result.getblocks until the promise is resolved
promise.resolve aresolves the promise
Every promise must eventually be resolved. Otherwise the memory used for the promise will be leaked, and any tasks depending on the promise's result will wait forever.