Use requestIdleCallback for config updates
This commit is contained in:
@@ -80,7 +80,9 @@ class App extends Component {
|
|||||||
config
|
config
|
||||||
});
|
});
|
||||||
while (true) {
|
while (true) {
|
||||||
await new Promise(resolve => setTimeout(resolve, 100));
|
await new Promise(resolve =>
|
||||||
|
requestIdleCallback(resolve, { timeout: 500 })
|
||||||
|
);
|
||||||
let hasPendingEvent = await this.connection.schedule(context =>
|
let hasPendingEvent = await this.connection.schedule(context =>
|
||||||
context.hasPendingEvent()
|
context.hasPendingEvent()
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user