11 2018 档案

摘要:概述:什么是线程池? 因为程序边运行边创建线程是比较耗时的,所以我们通过池化的思想:在程序开始运行前创建多个线程,这样,程序在运行时,只需要从线程池中拿来用就可以了.大大提高了程序运行效率.如何实现: 一般线程池都会有以下几个部分构成:1. 线程池管... 阅读全文
posted @ 2018-11-10 22:57 Tattoo_Welkin 阅读(1861) 评论(0) 推荐(0)
摘要:最简单的二分1.循环实现template int binary_search(const vector &set, const T &value){ auto low = set.begin(); auto high = set.end(); auto hi... 阅读全文
posted @ 2018-11-04 22:52 Tattoo_Welkin 阅读(228) 评论(0) 推荐(0)