代码搜索:threading

找到约 3,703 项符合「threading」的源代码

代码结果 3,703
www.eeworm.com/read/174332/9595152

py py_thread.py

''' Demonstrate the use of python threading''' import time import threading def ThreadFunc(): for i in range(15): print '...Printed from my thread.' time.sleep(1) class MyThread(thre
www.eeworm.com/read/265538/11261975

html os-faq-todo.html

Operating Systems FAQ :: To Do List
www.eeworm.com/read/490781/1196046

txt 计时(使用system.threading.timer).csproj.filelist.txt

bin\Debug\计时(使用System.Threading.Timer).exe bin\Debug\计时(使用System.Threading.Timer).pdb obj\Debug\ResolveAssemblyReference.cache obj\Debug\计时_使用System.Threading.Timer_.Properties.Resources.resources
www.eeworm.com/read/192647/8368136

txt 4.txt

多个执行线程经常要共享数据,如果仅仅读取共享数据还好,但是如果多个线程要修改共享数据的话就可能出现无法预料的结果。 假如两个线程对象t1和t2都要对数值num=0进行增1运算,那么t1和t2都各对num修改10次的话,那么num最终的结果应该为20。但是如果当t1取得num的值时(假如此时num为0),系统把t1调度为“sleeping”状态,而此时t2转换为“running”状态, ...
www.eeworm.com/read/192647/8368139

txt xiancheng.txt

name:testThread.py import threading import time import random class PrintThread(threading.Thread): """欢您的使用 你还好吗""" def __init__(self,threadname): threading.Thread.__i
www.eeworm.com/read/192647/8368142

txt 6.txt

python线程HelloWorld 改变num的值可以控制线程的数量 弄它几千个不是问题 呵呵 每个线程启动后会随机睡眠1-3秒 醒来后结束 [code] #!/usr/bin/env python import threading import time import random class PrintThread(threading.Thread):
www.eeworm.com/read/192647/8368146

txt 5.txt

我们经常会采用生产者/消费者关系的两个线程来处理一个共享缓冲区的数据。例如一个生产者线程接受用户数据放入一个共享缓冲区里,等待一个消费者线程对数据取出处理。但是如果缓冲区的太小而生产者和消费者两个异步线程的速度不同时,容易出现一个线程等待另一个情况。为了尽可能的缩短共享资源并以相同速度工作的各线程的等待时间,我们可以使用一个“队列”来提供额外的缓冲区。 创建一个“队列”对象 ...
www.eeworm.com/read/192647/8368149

txt 3.txt

我们在做软件开发的时候很多要用到多线程技术。例如如果做一个下载软件象flashget就要用到、象在线视频工具realplayer也要用到因为要同时下载media stream还要播放。其实例子是很多的。 线程相对进程来说是“轻量级”的,操作系统用较少的资源创建和管理线程。程序中的线程在相同的内存空间中执行,并共享许多相同的资源。 在python中如何创建一个线程对象 ...
www.eeworm.com/read/291183/8438162

cpp form1.cpp

#include "stdafx.h" #include "Form1.h" #include using namespace ruanjian; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
www.eeworm.com/read/290865/8457914

cpp classroom.cpp

// ClassRoom.cpp: 主项目文件。 #include "stdafx.h" #include "MainInterface.h" #include "WaitInterface.h" using namespace ClassRoom; [STAThreadAttribute] int main(array ^args)