事情的起因是我在看下面一段代码遇到的疑惑,明明是while True,为什么代码没有死循环??class D(threading.Thread):
def __init__(self, queue):
threading.Thread.__init__(self)
self.queue = queue
def run(self):
w...
分类:
编程语言 时间:
2014-10-15 03:29:29
阅读次数:
298
1 import random 2 import threading 3 4 results = [] 5 6 def compute(): 7 #random.randint(1,100) 返回一个随机值 8 results.append(sum([random.randin...
分类:
编程语言 时间:
2014-10-15 01:20:29
阅读次数:
219
#!/usr/bin/env python#coding=utf-8import threadingimport urllibimport reimport timecur=0last=0totalcount=0depth=0t_mutex=threading.Condition() class M...
分类:
编程语言 时间:
2014-10-15 00:21:09
阅读次数:
297
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;us...
代码:using System;using System.Configuration;using System.IO;using System.Threading;namespace FQDService.Utils{ /// /// 写日志类 /// public cl...
第一步:用C#用各种类型的编码生成txt文档 using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.IO;
namespace?WordT...
分类:
编程语言 时间:
2014-10-14 00:15:38
阅读次数:
465
声明:本文整理自【弯柚博客】,《Python:使用threading模块实现多线程编程》系列,原作者为 walfred,整理者为 whypro,出于对作者的尊敬,转帖时请注明原作者。一、综述Python这门解释性语言也有专门的线程模型,Python虚拟机使用GIL(Global Interprete...
分类:
编程语言 时间:
2014-10-13 15:36:59
阅读次数:
182
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MongoDB.Driver; namespace CD...
分类:
数据库 时间:
2014-10-13 13:02:09
阅读次数:
452
程序Ⅰ:通过Task类创建新线程 using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Threading;
using?System.Threading.Tasks;
namespace?Test000
{...
using System;using System.Collections.Generic;using System.Linq;using System.Net.Http;using System.Text;using System.Threading.Tasks;using Newtonsoft....