finishSync 静态方法

void finishSync()

完成最后启动的同步操作。

实现

static void finishSync() {
  if (!_hasTimeline) {
    return;
  }
  if (_stack.isEmpty) {
    throw new StateError('Uneven calls to startSync and finishSync');
  }
  // Pop top item off of stack.
  var block = _stack.removeLast();
  if (block == null) {
    // Dart stream was disabled when startSync was called.
    return;
  }
  // Finish it.
  block.finish();
}