摘要:
#coding:utf-8 import time import os import multiprocessing import json class Work(object): def __init__(self,q): self.q=q def send(self,message): if n 阅读全文
posted @ 2022-12-16 23:00
repinkply
阅读(17)
评论(0)
推荐(0)
摘要:
#coding:utf-8 import time import os import multiprocessing def work(count): print(count,',进程id:',os.getpid()) time.sleep(5) if __name__ == '__main__': 阅读全文
posted @ 2022-12-16 20:59
repinkply
阅读(84)
评论(0)
推荐(0)
摘要:
1.没有多进程的版本 os.getpid() # 获取当前进程的pid #coding:utf-8 import time import os def work_a(): for i in range(10): print(i,'a',os.getpid()) time.sleep(1) def w 阅读全文
posted @ 2022-12-16 18:11
repinkply
阅读(28)
评论(0)
推荐(0)
摘要:
1.Linux 文件夹 #include <sys/stat.h> #include <dirent.h> Linux 中一切皆文件,对文件夹的操作本质上也是对文件的操作。 /* Open a directory stream on NAME. Return a DIR stream on the 阅读全文
posted @ 2022-12-16 15:08
repinkply
阅读(131)
评论(0)
推荐(0)
摘要:
线程创建函数: /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is sto 阅读全文
posted @ 2022-12-16 11:08
repinkply
阅读(52)
评论(0)
推荐(0)

浙公网安备 33010602011771号