function task() {
    var future = new Future();

    fn(function(result) {
      future.return(result);
    });

    return future;
  }
Execute a function and return after the callback `done` is called.
This is used for running asynchronous functions in a synchronous way.

The callback takes an optional argument which is then returned by
`waitFor()`.

```javascript
var result = transport.waitFor(function(done) {
  require('node-notifier').notify({
      message: 'Hello World'
    }, function(err, response) {
      done(err || 'sent!');
    });
});
console.log(result); // 'sent!'
```

@method waitFor(fn(done))
@return {} mixed