ES6 生成器代码中 task/perform 的用户是什么?

What is the user of task/perform in ES6 Generator Code?

我有一个 Ember 应用程序,在我项目的某处,我可以看到以下用 ES6 编写的代码。

expandRow: task(function* (row, data, params){
    var $this = this;
    // Some code
    // ...
    // ...
    // const response = yield this.someServerCall(url, params);
    // ...
    // ...  
});

以上在某处使用

调用
this.get('expandRow').perform(row, data, params);

看了上面的内容,虽然我对 ES6 中的生成器语法有所了解,但我对 "task" 和 "perform" 的具体使用有点困惑。

我找不到任何地方的记录。此外,我在我的代码中找不到任何自定义定义。 我应该去哪里了解更多关于语法的信息?

这些都记录在 ember 文档

的任务函数语法区域

http://ember-concurrency.com/docs/task-function-syntax/

来自文档的示例:

pickRandomNumbers: task(function * () {
  let nums = [];
  for (let i = 0; i < 3; i++) {
    nums.push(Math.floor(Math.random() * 10));
  }

  this.set('status', `My favorite numbers: ${nums.join(', ')}`);
}),

perform 函数只是执行上述任务的一种方式。