Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c7b8df

Browse files
committed
Repeating listenLetterPromise if CPU was too fast.
1 parent6946c71 commit7c7b8df

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
/nbproject
23
/opencorpora/dict.opcorpora.xml
34
/opencorpora-testing/dict.opcorpora.xml
45
/opencorpora-testing/s.rb

‎js/testRunner.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@
7171
}
7272

7373
constlistenLetterPromise=(workerIndex,letterIndex)=>{
74+
if(jsonPromises[workerIndex].length<=letterIndex){
75+
setTimeout(()=>{listenLetterPromise(workerIndex,letterIndex)},100);
76+
return;
77+
}
78+
7479
varworker=workers[workerIndex];
7580
jsonPromises[workerIndex][letterIndex].then(response=>response.json()).then(words=>{
7681
worker.postMessage({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp