数据结构
漫步人生路1
这个作者很懒,什么都没留下…
展开
-
数据结构--顺序线性表
最近学习java,用这门语言温习一下数据结构。public class List{ private int length; private int[] array; public List() { length = 0; array = new int[20]; } public boolean Insert(int原创 2016-10-17 14:57:44 · 323 阅读 · 0 评论 -
用线程同步函数超时机制做计时器
最近项目中看到代码中有很奇怪的写法,线程循环用到windows线程同步方法的事件。但是这个事件不是用来做同步,用来当计时器使用,如下: thread function: while(m_hEvent && WaitForSingleObject(m_hEvent, nTimeout) != WAIT_OBJECT_0) {原创 2017-07-05 22:25:05 · 370 阅读 · 0 评论