python [代理池]https://github.com/jhao104/proxy_pool/blob/master/ProxyGetter/getFreeProxy.py xpath [xpath]https://github.com/jhao104/proxy_pool/blob/mast ...
分类:
Web程序 时间:
2020-01-04 20:24:42
阅读次数:
235
当线程池的任务缓存队列已满并且线程池中的线程数目达到maximumPoolSize时,如果还有任务到来就会采取任务拒绝策略,通常有以下四种策略: AbortPolicy:丢弃任务并抛出RejectedExecutionException异常。 这是线程池默认的拒绝策略,在任务不能再提交的时候,抛出异 ...
分类:
编程语言 时间:
2020-01-04 16:58:58
阅读次数:
234
package netty; import static io.netty.handler.codec.http.HttpHeaderNames.CONNECTION; import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT... ...
分类:
Web程序 时间:
2020-01-03 12:19:22
阅读次数:
117
import constant.Collect; import entity.User; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; import java.u ...
分类:
编程语言 时间:
2020-01-03 12:06:31
阅读次数:
74
```sql# pip3 install DBUtilsfrom DBUtils.PooledDB import PooledDBimport pymysql'''数据库连接池'''POOL = PooledDB( creator=pymysql, # 使用链接数据库的模块 maxconnectio... ...
分类:
数据库 时间:
2020-01-03 11:58:08
阅读次数:
81
public R getVerifyCode(String phone) { if (redisTemplate.hasKey(Constant.PREFIX_VER + phone)) { return R.error("请不要频繁发送短息"); } else { // 生成6位验证码 Strin ...
分类:
移动开发 时间:
2020-01-02 22:28:34
阅读次数:
124
```python import requests import re import uuid from concurrent.futures import ThreadPoolExecutor pool = ThreadPoolExecutor(50) # 爬虫三部曲 # 1.发送请求 def g... ...
分类:
其他好文 时间:
2020-01-02 20:58:12
阅读次数:
111
1.线程池 import time from concurrent.futures import ThreadPoolExecutor def func(n): time.sleep(2) print(n) t_pool = ThreadPoolExecutor(max_workers=5) # 创 ...
分类:
编程语言 时间:
2020-01-02 20:35:31
阅读次数:
91
参考:Max Degree of Parallelism最大并行度配置 结论: 与设置的线程数有关 有设置的并行度有关 测试如下: @@@code System.Threading.ThreadPool.SetMinThreads(20, 20); System.Threading.ThreadPo... ...
分类:
其他好文 时间:
2020-01-02 19:06:26
阅读次数:
180