当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript runloop.run.backburner类代码示例

本文整理汇总了TypeScript中@ember/runloop.run.backburner的典型用法代码示例。如果您正苦于以下问题:TypeScript run.backburner类的具体用法?TypeScript run.backburner怎么用?TypeScript run.backburner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了run.backburner类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: unloadRecord

 unloadRecord() {
   if (this.isDestroyed) {
     return;
   }
   this._destroyRelationships();
   this.reset();
   if (!this._scheduledDestroy) {
     this._scheduledDestroy = run.backburner.schedule(
       'destroy',
       this,
       '_cleanupOrphanedRecordDatas'
     );
   }
 }
开发者ID:code0100fun,项目名称:data,代码行数:14,代码来源:record-data.ts

示例2: unloadRecord

  /*
    Unload the record for this internal model. This will cause the record to be
    destroyed and freed up for garbage collection. It will also do a check
    for cleaning up internal models.

    This check is performed by first computing the set of related internal
    models. If all records in this set are unloaded, then the entire set is
    destroyed. Otherwise, nothing in the set is destroyed.

    This means that this internal model will be freed up for garbage collection
    once all models that refer to it via some relationship are also unloaded.
  */
  unloadRecord() {
    if (this.isDestroyed) {
      return;
    }
    this.send('unloadRecord');
    this.dematerializeRecord();
    if (this._scheduledDestroy === null) {
      this._scheduledDestroy = run.backburner.schedule(
        'destroy',
        this,
        '_checkForOrphanedInternalModels'
      );
    }
  }
开发者ID:emberjs,项目名称:data,代码行数:26,代码来源:internal-model.ts


注:本文中的@ember/runloop.run.backburner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。