<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [com-tools](./com-tools.md) &gt; [multipleLoop](./com-tools.multipleloop.md)

## multipleLoop() function

multipleLoop(option)=<!-- -->&gt; stopLoop() 多次遍历、分批循环；可以把一个大遍历分成若干个小遍历来完成；

**Signature:**

```typescript
export function multipleLoop<StopInfo,ThisValue>(mLoopOpts:{
    loopCall:(this:ThisValue,index:number,stepCount:number,total:number)=>StopInfo,
    complete ?: (this:ThisValue,stopInfo:StopInfo,index:number,stepCount:number,total:number)=>void,
    stepComplete ?: (this:ThisValue,index:number,stepCount:number,total:number)=>StopInfo,
    thisValue?:ThisValue,
    total?:number,
    step?:number,
    delay?:number
}):(stopInfo?:StopInfo)=>void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

mLoopOpts


</td><td>

{ loopCall:(this:ThisValue,index:number,stepCount:number,total:number)=&gt;StopInfo, complete ?: (this:ThisValue,stopInfo:StopInfo,index:number,stepCount:number,total:number)=&gt;void, stepComplete ?: (this:ThisValue,index:number,stepCount:number,total:number)=&gt;StopInfo, thisValue?:ThisValue, total?:number, step?:number, delay?:number }


</td><td>


</td></tr>
</tbody></table>
**Returns:**

(stopInfo?:StopInfo)=&gt;void

stopLoop : (stopInfo)=<!-- -->&gt;<!-- -->Void 停止循环的函数；调用该函数，会终止正在进行的循环； 入参 stopInfo : any 停止循环的相关信息

