码迷,mamicode.com
首页 >  
搜索关键字:thread stack    ( 23141个结果
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov ...
分类:其他好文   时间:2016-09-23 07:39:23    阅读次数:112
虚拟机类加载机制(3)——线程上下文类加载器
之所以将线程上下文类加载器(Thread Context ClassLoader)单独拿出来写,确实是因为它涉及的东西比较多,既然带有线程两个字,一定也是非常重要的一个东西。 我们首先来回顾一下类加载器的双亲委派模型。 在上一章《虚拟机类加载机制(2)——类加载器》中我们解释了何为类加载器的“双亲委 ...
分类:编程语言   时间:2016-09-23 01:16:52    阅读次数:221
day9---多线程,线程锁,队列
进程、线程http://www.ruanyifeng.com/blog/2013/04/processes_and_threads.html使用threading模块实现多线程编程[综述]Python这门解释性语言也有专门的线程模型,Python虚拟机使用GIL(GlobalInterpreterLock,全局解释器锁)来互斥线程对共享资源的访问,但暂时无法利用多处..
分类:编程语言   时间:2016-09-23 00:03:07    阅读次数:203
基于struts2的文件上传下载
1.struts.xml 2.上传action 3.下载action [注意]: 1. 下载时出现500:Can not find a java.io.InputStream with the name [is] in the invocation stack. Check the <param n ...
分类:Web程序   时间:2016-09-22 11:18:15    阅读次数:201
Binary Tree & Divide Conquer 完整笔记l
1. 前序遍历 1.1 前序遍历的非递归的方式 利用stack while (!stack.isEmpty()) { pop作为根节点; 根节点加入result list; 把右边节点加入到stack; 把左边节点加入到stack; } 1 public class Solution { 2 pub ...
分类:其他好文   时间:2016-09-22 08:46:51    阅读次数:208
算法9---二叉树的遍历不用栈和递归
二叉树的遍历不用栈和递归 转自:ACM之家 http://www.acmerblog.com/inorder-tree-traversal-without-recursion-and-without-stack-5988.html 我们知道,在深度搜索遍历的过程中,之所以要用递归或者是用非递归的栈方 ...
分类:编程语言   时间:2016-09-21 23:11:06    阅读次数:259
uWSGI, Thread, time.sleep 使用问题
下面的问题,在flask程序独立运行中,都没有问题,但是部署在 uwsgi 上表现异常: 1. 在http请求处理过程中,产出异步线程,放在线程池中,线程的启动时间有比较明显的延迟。 2. 在异步线程中,使用了 time.sleep 方法,睡眠时间远远超过设定值,而且,似乎不会主动醒来。 后参考了博 ...
分类:其他好文   时间:2016-09-21 21:20:15    阅读次数:113
测试Thread.isAlive
结果: truetruetruetruetruetruetruetruetruetrue线程停止falsefalsefalsefalsefalsefalse 能正确识别线程是否在运行 ...
分类:其他好文   时间:2016-09-21 13:00:20    阅读次数:203
用内部类创建线程
//内部类实现多线程 new Thread(){ public void run(){ for(int i=0;i<50;i++){ System.out.println("play game" + i); } } }.start(); //内部类实现多线程 new Thread(new Runna ...
分类:编程语言   时间:2016-09-21 10:20:26    阅读次数:127
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!