码迷,mamicode.com
首页 >  
搜索关键字:threading    ( 3244个结果
Python通过多线程实现 `异步`
import threading, time def thead(num): print("线程%s开始执行" % num) time.sleep(5) print("线程%s执行完毕" % num) def main(): print("主方法开始执行") poll = [] # 线程池 for ...
分类:编程语言   时间:2020-06-17 15:34:10    阅读次数:65
Python3 -- 多线程(threading模块、queue模块)
队列模块queue: from queue import Queue # 使用 q = Queue() q.put(url) # url ,这里只是举个栗子 # 获取队列内容 q.get() # 当队列为空时,发生阻塞 # 获取队列内容 q.get(block=True, timeout=3) # ...
分类:编程语言   时间:2020-06-17 12:28:33    阅读次数:74
多线程使用
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Data; namespace MSCTool { p ...
分类:编程语言   时间:2020-06-16 23:16:15    阅读次数:102
C#类(二):继承和多态(EduCoder实训题目)
第1关:继承 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace K1 { public abstr ...
分类:Windows程序   时间:2020-06-15 22:58:40    阅读次数:86
子线程更新界面文本
当在线程中处理完一个事情,需要将结果反馈给界面时,如果直接修改界面文本就会报“在不是创建它的线程中访问控件”的错。在此记录两个处理办法: 1.线程同步 System.Threading.SynchronizationContext _SyncContext = new System.Threadin ...
分类:编程语言   时间:2020-06-15 17:41:19    阅读次数:56
C#函数拓展(EduCoder实训题目)
第1关:结构函数 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace H1 { class Prog ...
分类:Windows程序   时间:2020-06-15 16:01:52    阅读次数:121
C#函数(EduCoder实训题目)
第1关:写一个函数 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace G1 { class Pro ...
分类:Windows程序   时间:2020-06-15 15:32:16    阅读次数:116
python学习第33天
一.死锁,互斥锁,递归锁 死锁:只上锁不解锁容易造成死锁现象 互斥锁:加一把锁就对应解一把锁,形成互斥锁 递归锁:用于解决死锁,只是一种应急的处理方法 from threading import RLock 从语法上讲,锁可以互相嵌套,但不要使用 不要因为逻辑问题让上锁分成两次,导致死锁 二.线程队 ...
分类:编程语言   时间:2020-06-13 23:44:08    阅读次数:96
自定义Local,支持线程和协程数据访问
# from threading import Thread # import time # lqz = -1 # def task(arg): # global lqz # lqz = arg # time.sleep(2) # print(lqz) # # for i in range(10): ...
分类:编程语言   时间:2020-06-13 23:17:08    阅读次数:80
asp.net使用WebBrowser采集加载完毕后的页面(线程安全)
工具类代码:(代码可以自己整理下,这里重点在实现方式) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Threading; using System. ...
分类:编程语言   时间:2020-06-10 18:48:04    阅读次数:57
3244条   上一页 1 ... 11 12 13 14 15 ... 325 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!