码迷,mamicode.com
首页 >  
搜索关键字:rt thread    ( 14779个结果)
C# 同一应用程序域不同线程之间的参数传递方式
很久没有写博客了,最近的项目不用写代码。今天没事就看看thread之间的参数传递方式,这里主要适用于运行在不同线程的两个方法之间参数传递。直接看代码1。方法之间直接传递参数 void DemoParam() { Console.WriteLine("DemoP...
分类:编程语言   时间:2014-11-06 19:31:47    阅读次数:162
python threading condition
threading time Producer(threading.Thread): run(self): count True: con.acquire(): count>1000: con.wait() : count=count+100 msg=self.name++str(count) msg con.notify() con.release() time.sleep(1) Consumer(threading.Thread): run(self): count True: con.acqu..
分类:编程语言   时间:2014-11-06 17:47:36    阅读次数:239
C# 同一应用程序域不同线程之间的参数传递方式
很久没有写博客了,最近的项目不用写代码。今天没事就看看thread之间的参数传递方式,这里主要适用于运行在不同线程的两个方法之间参数传递。直接看代码 1。方法之间直接传递参数 void DemoParam() { Console.WriteLine("DemoParam:" + Thread.CurrentThread.ManagedT...
分类:编程语言   时间:2014-11-06 17:31:58    阅读次数:166
python 线程学习
线程锁#!/usr/bin/pythonimportthreadingimporttimeclassMyThread(threading.Thread):def__init__(self,threadname):threading.Thread.__init__(self,name=threadname)设定线程名称defrun(self):globalxlock.acquire()加锁foriinrange(3):x=x+1time.sleep(2)printxlock.release..
分类:编程语言   时间:2014-11-06 15:03:13    阅读次数:151
JUMP上楼梯游戏IOS源码
基于cocos2d-x的简单JUMP上楼梯游戏,配有音效。适合新接触cocos2d的同学学习。规则类似 “是男人就上100层”的经典小游戏,就是控制宝宝通过跳上不同高度的踏板而慢慢升高。详细说明:http://ios.662p.com/thread-1711-1-1.html
分类:移动开发   时间:2014-11-06 10:45:51    阅读次数:203
Problem 2082 过路费树链剖分
裸题直接搞。#include#include#include#include#include#includeusing namespace std;#define lson l,mid,rt> 1; build(lson); build(rson);}void up(LL rt){ su...
分类:其他好文   时间:2014-11-06 01:54:25    阅读次数:245
java线程池
1、new Thread的弊端执行一个异步任务你还只是如下new Thread吗?1 new Thread(new Runnable() {2 3 @Override4 public void run() {5 // TODO Auto-generated metho...
分类:编程语言   时间:2014-11-06 00:24:17    阅读次数:287
x264编码延时研究
研究了一下x264编码延时. 方法是加log在x264.c static int encode( x264_param_t *param, cli_opt_t *opt ) {     ...         i_frame_size = encode_frame( h, opt->hout, &pic, &last_dts );         if( i_frame_size ==...
分类:其他好文   时间:2014-11-05 23:07:23    阅读次数:359
集合的删除
1:对集合中的元素直接进行遍历删除时,会报一下错误:出现了Exception in thread "main" java.util.ConcurrentModificationExceptionat java.util.ArrayList$Itr.checkForComodification(Arr...
分类:其他好文   时间:2014-11-05 19:12:51    阅读次数:158
HDU 3791
http://acm.hdu.edu.cn/showproblem.php?pid=3791建立二叉树,对比是否相同#include #include #include using namespace std;#define lson rt<<1#define rson rt<<1|1int tre...
分类:其他好文   时间:2014-11-05 19:06:49    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!