set threadcount in start
This commit is contained in:
parent
39d99685d1
commit
e2eb71a1a6
|
@ -72,7 +72,7 @@ public class TelegramAPI implements Runnable {
|
|||
private FeedbackCommand feedbackCmd;
|
||||
|
||||
//async
|
||||
private AsyncHandler async = new AsyncHandler(this);
|
||||
private AsyncHandler async = null;
|
||||
public static Callback<Throwable, Void> IOE400supressor = new Callback<Throwable, Void>() {
|
||||
@Override
|
||||
public Void call(Throwable t) throws Throwable {
|
||||
|
@ -108,7 +108,13 @@ public class TelegramAPI implements Runnable {
|
|||
}
|
||||
|
||||
public void start() {
|
||||
start(1);
|
||||
}
|
||||
|
||||
//start with a specified threadcount for async operations
|
||||
public void start(int threadCount) {
|
||||
if(thread == null) {
|
||||
async = new AsyncHandler(this, threadCount);
|
||||
if(!disableFeedback) {
|
||||
//init Feedback
|
||||
feedbackCmd = new FeedbackCommand(this, admins);
|
||||
|
|
Loading…
Reference in New Issue