docs: function syncInvoke(that, method, args) {
    var result
    var fiber = getCurrentFiber()
    var yielded = false
    var callbackCalled = false
    var wasError = false
  
    // augment original args with callback
    args = args ? Array.prototype.slice.call(args) : []
    args.push(function(error, value) {
      callbackCalled = true
      if (error) {
        wasError = true
      }
      if (yielded) { // this may or may not occur after the yield() call below
        fiber.run(error || value)
      } else {
        result = error || value
      }
    })
  
    // apply() may or may not result in callback being called synchronously
    if (that) {
      that[method].apply(that, args)
    } else {
      method.apply(undefined, args)
    }
    if (!callbackCalled) { // check if apply() called callback
      yielded = true
      result = Fiber.yield()
    }
  
    if (wasError) {
      if (result instanceof Error){
        throw result
      } else {
        var errorMsg = result.message || JSON.stringify(result)
        throw new Error(errorMsg)
      }
    }
    return result
  }