摘要: name meaning Barrier(parties,action=None,timeout=None) 构建Barrier对象,指定参与方数目,timeout是wait方法未指定超时的默认值 n_waiting 当前在屏障中等待的线程数 parties 各方数,需要多少个等待 wait(tim 阅读全文
posted @ 2020-10-25 23:07 ascertain 阅读(412) 评论(0) 推荐(0) 编辑
摘要: from threading import Event,Thread import logging,time FORMAT='%(asctime)s %(threadName)s %(thread)d %(message)s' logging.basicConfig(format=FORMAT,le 阅读全文
posted @ 2020-10-25 21:04 ascertain 阅读(104) 评论(0) 推荐(0) 编辑
摘要: shell中if while等后必须接命令,利用命令的exit code作为判断,而其他高级语言是利用return值作为判断对于非命令变量,可以利用test or [ ] or [[ ]] 进行判断如果确实需要用命令或函数的返回值作为判断,可以如下 function p(){ echo $$ exi 阅读全文
posted @ 2020-10-25 12:54 ascertain 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #下载fpm yum install ruby ruby-dev #切换gem源为国内源 gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ #下载fpm gem install -y fpm # 阅读全文
posted @ 2020-10-25 01:36 ascertain 阅读(166) 评论(0) 推荐(0) 编辑