摘要: proxyee down下载速度不错, 底层使用netty+多线程,最近在看netty网络方面的应用,正好这是个案例 源代码地址 https://github.com/proxyee down org/proxyee down 基本原理 前端选择下载url 及文件保存路径 后端尝试使用http多段下 阅读全文
posted @ 2018-12-30 20:38 funny_coding 阅读(636) 评论(0) 推荐(0) 编辑
摘要: CAS 对应cpu的硬件指令, 是最原始的原子操作 cas主要是在AtomicInteger AtomicXXX类中使用, 用于实现线程安全的自增操作 ++. 对应一个unsafe对象, 根据os平台的不同,操作cpu指令c++代码有少许不同 compareAndSetState(int expec 阅读全文
posted @ 2018-12-30 11:38 funny_coding 阅读(1307) 评论(0) 推荐(1) 编辑
build beautiful things, share happiness