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