码迷,mamicode.com
首页 >  
搜索关键字:threading    ( 3244个结果
43_2013年11月22日 线程池 Socket(Thread Lock Process 摇奖 线程池ThreadPool)
1》模拟线程池,生产者消费者问题using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;using System.Threading.Tasks;...
分类:编程语言   时间:2014-11-12 00:28:17    阅读次数:539
观察者模式
usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespace观察者模式 { classProgram { staticvoidMain(string[]args) { 看NBA的同事zhangSan=new看NBA的同事(){Name="张三"}; 看NBA的同事li=new看NBA的同..
分类:其他好文   时间:2014-11-11 02:05:56    阅读次数:185
C#中静态方法
一个类,有静态方法,并不表明这个类是静态类其次,静态方法,是不能被派生类继承的。例如: System.Threading.WaitHandle这个类中的静态方法WaitAll和WaitAny并没有被其派生类AutoResetEvent和ManualResetEvent所继承
分类:Windows程序   时间:2014-11-10 19:37:17    阅读次数:181
生成 网站“面包屑” XML
using System;using System.Collections.Generic;using System.IO;using System.Threading;using System.Xml;namespace Helper{ public class SitemapXml { ...
分类:Web程序   时间:2014-11-10 13:42:32    阅读次数:224
C# Socket简单例子(服务器与客户端通信)
先发服务端的(Server)完整代码如下: using?System; using?System.Collections.Generic; using?System.Linq; using?System.Text; using?System.Net.Sockets; using?System.Net; using?System.Threading;...
分类:Windows程序   时间:2014-11-09 20:55:55    阅读次数:316
转:去掉DataTable重复数据(程序示例比较)
using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Text;using System.Threading.Tasks;namespace RemoveDupRo...
分类:其他好文   时间:2014-11-07 18:54:55    阅读次数:150
C#延迟执行 1.0版本
涉及的知识有泛型,委托,多线程 实现了延迟执行一个函数,可以指定延迟时间,延迟的 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading....
分类:Windows程序   时间:2014-11-06 21:33:03    阅读次数:221
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
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
<转>Winform的多线程问题
在System.Threading命名空间下,包含了用于创建和控制线程的Thread类。对线程的常用操作有:启动线程、终止线程、合并线程和让线程休眠等。 1. 启动线程 在使用线程前,首先要创建一个线程。其一般形式为:Thread t=new Thread(enterPoint); 其中enterP...
分类:编程语言   时间:2014-11-05 12:46:42    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!