mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
lower priority for library building
This commit is contained in:
parent
ab0f51bda7
commit
0defdc0df3
1 changed files with 8 additions and 4 deletions
|
@ -434,7 +434,7 @@ public final class Library {
|
||||||
|
|
||||||
public void startBuild() {
|
public void startBuild() {
|
||||||
setStatus(myStatusMask | STATUS_LOADING);
|
setStatus(myStatusMask | STATUS_LOADING);
|
||||||
new Thread("Library.build") {
|
final Thread builder = new Thread("Library.build") {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
build();
|
build();
|
||||||
|
@ -442,7 +442,9 @@ public final class Library {
|
||||||
setStatus(myStatusMask & ~STATUS_LOADING);
|
setStatus(myStatusMask & ~STATUS_LOADING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
};
|
||||||
|
builder.setPriority((Thread.MIN_PRIORITY + Thread.NORM_PRIORITY) / 2);
|
||||||
|
builder.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUpToDate() {
|
public boolean isUpToDate() {
|
||||||
|
@ -461,7 +463,7 @@ public final class Library {
|
||||||
|
|
||||||
public void startBookSearch(final String pattern) {
|
public void startBookSearch(final String pattern) {
|
||||||
setStatus(myStatusMask | STATUS_SEARCHING);
|
setStatus(myStatusMask | STATUS_SEARCHING);
|
||||||
new Thread("Library.searchBooks") {
|
final Thread searcher = new Thread("Library.searchBooks") {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
searchBooks(pattern);
|
searchBooks(pattern);
|
||||||
|
@ -469,7 +471,9 @@ public final class Library {
|
||||||
setStatus(myStatusMask & ~STATUS_SEARCHING);
|
setStatus(myStatusMask & ~STATUS_SEARCHING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
};
|
||||||
|
searcher.setPriority((Thread.MIN_PRIORITY + Thread.NORM_PRIORITY) / 2);
|
||||||
|
searcher.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void searchBooks(String pattern) {
|
private void searchBooks(String pattern) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue