下面的代码:private void getOnlineConnections()
{
for (int i = 0; i < contacts.size(); i++)
{
final Persons person = contacts.get(i);
String queryString = null;
try {
queryString = String.format(Constants.GET_ONLINE_URL,
URLEncoder.encode(person.myId, "UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
ResponseCallback callback = new ResponseCallback()
{
@Override
public void onSuccess(String response)
{
response = response.trim();
}
@Override
public void onFailure(String exception)
{}
};
new MyAsyncTask(queryString, callback);
}
}现在联系人的数量多于128 或者超过TheadPoolExecutor的限度。如何增加这个限制的数量,然后不出现 RejectExecutionError 错误。
添加回答
举报
0/150
提交
取消