摘要:
#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 阅读全文
摘要:
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 阅读全文
摘要:
1.Linux 文件夹 #include <sys/stat.h> #include <dirent.h> Linux 中一切皆文件,对文件夹的操作本质上也是对文件的操作。 /* Open a directory stream on NAME. Return a DIR stream on the 阅读全文
摘要:
线程创建函数: /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is sto 阅读全文