create account

Python3 线程 & GIL 学习笔记 by oflyhigh

View this thread on: hive.blogpeakd.comecency.com
· @oflyhigh ·
$312.22
Python3 线程 & GIL 学习笔记
作为Python的初学者,基本上是遇到啥需求,就现去学习,能解决问题就可以。

比如前段时间,做的一个小程序,需要并发处理一些操作,所以就想到了使用线程的概念。

![](https://steemitimages.com/DQmd49dm5bKty2sUUE8hHpiAYFhBiTMjerpSbBojdJdWYGK/image.png)

# _thread 模块

上网学习了一下
https://docs.python.org/3/library/_thread.html
`_thread.start_new_thread(function, args[, kwargs])`
这个貌似很简单

因为我的程序把线程启动起来就可以,然后就自己做自己的事情,做完就退出,对全局的东西不需要进行改变,所以也用不到线程锁之类的概念。


我用这个模块实现了我的程序,良好地运行了很长一段时间,完全符合我的要求。

 # threading 模块

前些天有个新任务,同样需要用到线程。不同的是,我程序中需要用到当前在执行的线程数量,当数量超过我定义的限制,就暂停启动新线程,直到其它线程有结束的,当前线程数量下降。

我想到的方法设置一个全局变量: 线程启动,变量加一; 线程退出,变量减一。
为了防止几个线程同时读写的情况,需要在对变量操作的时候加锁,操作完成释放。
然后我主线程中访问这个变量,判断当前运行中线程的数量
听起来似乎可行,然后我边去学习怎么加锁和释放

然后,我才发现我用_thread被叫做低级( low-level)模块, 而高级(higher-level)模块threading直接提供了
`threading.active_count()`
https://docs.python.org/3/library/threading.html

既然有了高级模块,咱就别自己造轮子啦。
然后就要去研究一下这个threading 模块咋用啦,结果发现还整出两种使用方法:

##### 方法一:
`threading.Thread(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)`
方法一的方式和`_thread.start_new_thread`比较类似。

##### 方法二:
从Thread继承,并重写run()方法


我选择方法二的方式实现我的程序
`class myThread (threading.Thread):`
在 `__init__`中传入要处理的参数
在`run`做我要做的处理

在程序中这样启动线程:
`thread = myThread(arg_a, arg_b, arg_c)`
`thread.start()`

在程序中使用: `threading.active_count()`判断数量


程序运行了几天,最多时候几十个线程再跑,工作状况良好,完全达到预期。

# GIL 

在了解和学习Python多线程过程中,看到不少对Python多线程的争议。尤其是在多CPU和多核处理器环境下,没法充分利用CPU资源,确切地说,只能可一个CPU霍霍。

究其原因,是因为Python原始解释器CPython中使用了***GIL (Global Interpreter Lock,全局解释器锁)***来限制线程对共享资源的访问,同一时间只会有一个获得GIL的线程在跑,其他线程则处于等待状态。与其说是多线程,更像是时间片调度,当然了,具体调度方法肯定是更复杂和更科学的。

因为这个GIL的存在,Python多线程,没法真正的并行处理,而是并发处理。对于CPU密集型任务,如果使用多线程,因为GIL的存在导致除了不能利用多核多CPU的优势,反而要浪费时间在线程间切来切去,效率会变得低下。而对于IO密集型任务,因为IO浪费的时间比较多,所以使用多线程是会提升效率的。

看了下我的程序,嗯,还好,都是网络访问的,至少用多线程实现起来很方便,事实也证明很好用。

至于Python下怎么利用多核或者多CPU,据说是使用多进程。
但是我暂时没有这种需要,毕竟,我的原则是,好用就行,折腾啥呀。

另外,关于并发处理,还有可以参考这里:
https://docs.python.org/3/library/asyncio.html
看起来挺高大上的,不明觉厉。

有关GIL可以参考:
https://wiki.python.org/moin/GlobalInterpreterLock

就这样啦,代码啥的就不贴出来充数了。
网上示例一大堆,大家感兴趣的自己去看看好了。


# 参考资料:

* https://docs.python.org/3/library/_thread.html
* https://docs.python.org/3/library/threading.html
* https://wiki.python.org/moin/GlobalInterpreterLock
* https://docs.python.org/3/library/asyncio.html
* http://www.wellho.net/solutions/python-python-threads-a-first-example.html
* https://www.tutorialspoint.com/python/python_multithreading.htm
* https://stackoverflow.com/questions/2846653/how-to-use-threading-in-python
* http://www.python-course.eu/threads.php
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 282 others
👎  
properties (23)
authoroflyhigh
permlinkpython3-and-gil
categorycn
json_metadata{"tags":["cn","cn-programming","python"],"image":["https://steemitimages.com/DQmd49dm5bKty2sUUE8hHpiAYFhBiTMjerpSbBojdJdWYGK/image.png"],"links":["https://docs.python.org/3/library/_thread.html","https://docs.python.org/3/library/threading.html","https://docs.python.org/3/library/asyncio.html","https://wiki.python.org/moin/GlobalInterpreterLock","http://www.wellho.net/solutions/python-python-threads-a-first-example.html","https://www.tutorialspoint.com/python/python_multithreading.htm","https://stackoverflow.com/questions/2846653/how-to-use-threading-in-python","http://www.python-course.eu/threads.php"],"app":"steemit/0.1","format":"markdown"}
created2017-08-20 11:03:51
last_update2017-08-20 11:03:51
depth0
children31
last_payout2017-08-27 11:03:51
cashout_time1969-12-31 23:59:59
total_payout_value259.232 HBD
curator_payout_value52.990 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,435
author_reputation6,344,336,061,337,513
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,338,296
net_rshares83,416,727,648,754
author_curate_reward""
vote details (347)
@abdelhadi ·
$0.36
Python is the best language. More easy for all programmer especially for new programers
👍  
properties (23)
authorabdelhadi
permlinkre-oflyhigh-2017820t165739778z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 15:57:39
last_update2017-08-20 15:57:39
depth1
children0
last_payout2017-08-27 15:57:39
cashout_time1969-12-31 23:59:59
total_payout_value0.345 HBD
curator_payout_value0.015 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length87
author_reputation11,701,809,477
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,358,304
net_rshares100,840,930,700
author_curate_reward""
vote details (1)
@akilie1029 ·
Hi @oflyhigh! I'm very curious about python. I use visual basic.net for some of my programs but I really don't know what can I do with python programming language. Can I use it in web development as well?
👍  
properties (23)
authorakilie1029
permlinkre-oflyhigh-python3-and-gil-20170820t113139003z
categorycn
json_metadata{"tags":["cn"],"users":["oflyhigh"],"app":"steemit/0.1"}
created2017-08-20 11:31:42
last_update2017-08-20 11:31:42
depth1
children0
last_payout2017-08-27 11:31:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length204
author_reputation5,297,103,276,823
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,339,941
net_rshares228,328,956
author_curate_reward""
vote details (1)
@angami · (edited)
I am an expert in Python
Believe me you will not find strength
It has a great benefit in many areas
Any question you send me and be happy with your friendship
我是Python的专家
相信我,你找不到实力
它在许多领域都有很大的好处
任何问题,你寄给我,并与你的友谊快乐
👍  ,
properties (23)
authorangami
permlinkre-oflyhigh-python3-and-gil-20170820t225831860z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 22:58:36
last_update2017-08-20 23:01:03
depth1
children0
last_payout2017-08-27 22:58:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length214
author_reputation-3,685,984,627
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,386,611
net_rshares1,026,879,297
author_curate_reward""
vote details (2)
@arcange ·
Congratulations @oflyhigh!
Your post was mentioned in the [hit parade](https://steemit.com/hit-parade/@arcange/daily-hit-parade-20170820) in the following category:

* Pending payout - Ranked 6 with $ 272,15
properties (22)
authorarcange
permlinkre-python3-and-gil-20170820t163945000z
categorycn
json_metadata""
created2017-08-21 14:38:30
last_update2017-08-21 14:38:30
depth1
children0
last_payout2017-08-28 14:38:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length208
author_reputation1,146,633,668,945,473
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,443,071
net_rshares0
@bahagia-arbi ·
Hi, I think your post is very important, but I am unlucky man because I dont understand at all. Could you tell me the core of what you have written on your post? Thanks a lot my feiend. Regard from Aceh.
properties (22)
authorbahagia-arbi
permlinkre-oflyhigh-2017821t25011471z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 19:50:18
last_update2017-08-20 19:50:18
depth1
children0
last_payout2017-08-27 19:50:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length203
author_reputation62,544,888,098,801
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,375,556
net_rshares0
@bukhairidin ·
good post.... I like, I like!
properties (22)
authorbukhairidin
permlinkre-oflyhigh-python3-and-gil-20170821t060102539z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-21 04:59:57
last_update2017-08-21 04:59:57
depth1
children0
last_payout2017-08-28 04:59:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation2,167,681,459,353
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,405,450
net_rshares0
@cartoonhd ·
-Excellent post thanks for sharing
I am a new steemians, maybe i should study first with you, regards know me
https://steemit.com/@cartoonhd    please follow me
I followed and upvoted.Would you like to follow and upvote me.
![DQmRKgYYp1TzWmvqtnfbMSLZQSgUXinUxqyHyd39HZ8j7gx.gif](https://steemitimages.com/DQmRKgYYp1TzWmvqtnfbMSLZQSgUXinUxqyHyd39HZ8j7gx/DQmRKgYYp1TzWmvqtnfbMSLZQSgUXinUxqyHyd39HZ8j7gx.gif)![DQmeEhY3iMJiyRhGjAM6aaUDfSuam7F722fD6iwqyWxVBMB_1680x8400.png](https://steemitimages.com/DQmZr4CcZryi9kn8kLQD11tbo9MXJUYfiBvDPu8DrJtanWS/DQmeEhY3iMJiyRhGjAM6aaUDfSuam7F722fD6iwqyWxVBMB_1680x8400.png)
properties (22)
authorcartoonhd
permlinkre-oflyhigh-python3-and-gil-20170821t135445247z
categorycn
json_metadata{"tags":["cn"],"image":["https://steemitimages.com/DQmRKgYYp1TzWmvqtnfbMSLZQSgUXinUxqyHyd39HZ8j7gx/DQmRKgYYp1TzWmvqtnfbMSLZQSgUXinUxqyHyd39HZ8j7gx.gif","https://steemitimages.com/DQmZr4CcZryi9kn8kLQD11tbo9MXJUYfiBvDPu8DrJtanWS/DQmeEhY3iMJiyRhGjAM6aaUDfSuam7F722fD6iwqyWxVBMB_1680x8400.png"],"links":["https://steemit.com/@cartoonhd"],"app":"steemit/0.1"}
created2017-08-21 13:54:45
last_update2017-08-21 13:54:45
depth1
children0
last_payout2017-08-28 13:54:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length606
author_reputation27,356,199,641
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,439,122
net_rshares0
@cryptousage ·
Where can I find more about python? Thank you.
properties (22)
authorcryptousage
permlinkre-oflyhigh-python3-and-gil-20170820t115238300z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 11:52:36
last_update2017-08-20 11:52:36
depth1
children0
last_payout2017-08-27 11:52:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length46
author_reputation38,479,085,902
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,341,059
net_rshares0
@deanliu ·
Next topic: **PlayboyMansion 行程 & GIRL 学习笔记**
properties (22)
authordeanliu
permlinkre-oflyhigh-python3-and-gil-20170820t122711843z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 12:27:12
last_update2017-08-20 12:27:12
depth1
children0
last_payout2017-08-27 12:27:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length45
author_reputation3,097,302,893,986,266
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,343,293
net_rshares0
@drphysiatre · (edited)
I would like to learn python ...give me advice.
properties (22)
authordrphysiatre
permlinkre-oflyhigh-2017820t12857342z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 11:09:12
last_update2017-08-20 11:10:18
depth1
children0
last_payout2017-08-27 11:09:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length47
author_reputation314,789,428,943
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,338,616
net_rshares0
@gothame ·
没想到,这上面讨论python,这么受欢迎。
properties (22)
authorgothame
permlinkre-oflyhigh-python3-and-gil-20170823t122202126z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-23 12:22:03
last_update2017-08-23 12:22:03
depth1
children0
last_payout2017-08-30 12:22:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation13,772,208,962
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,631,643
net_rshares0
@hossainsohag ·
COOLEST POST.NICE TO WATCH THIS MAKE MY DAY THANK YOU DEAR
properties (22)
authorhossainsohag
permlinkre-oflyhigh-python3-and-gil-20170822t200433714z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-22 20:04:42
last_update2017-08-22 20:04:42
depth1
children0
last_payout2017-08-29 20:04:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation912,466,875,814
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,568,475
net_rshares0
@johnsmit ·
次次次
properties (22)
authorjohnsmit
permlinkre-oflyhigh-python3-and-gil-20170820t120657893z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 12:04:30
last_update2017-08-20 12:04:30
depth1
children0
last_payout2017-08-27 12:04:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3
author_reputation-414,127,363,400
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,341,730
net_rshares0
@jubi ·
py安装了2个星期了。
**启动次数:2**
安装时启动1次,阅读完该文启动1次
👍  
properties (23)
authorjubi
permlinkre-oflyhigh-python3-and-gil-20170820t110651816z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 11:07:42
last_update2017-08-20 11:07:42
depth1
children1
last_payout2017-08-27 11:07:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length40
author_reputation82,406,494,254,467
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,338,515
net_rshares222,987,928
author_curate_reward""
vote details (1)
@oflyhigh ·
适合自己的就是最好的
有必要十八般武器样样精通吗?😀

你擅长PHP,就充分发挥PHP的优势好了
我是没啥擅长的,看Python易上手,就拿来学学
👍  
properties (23)
authoroflyhigh
permlinkre-jubi-re-oflyhigh-python3-and-gil-20170820t111247128z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 11:12:48
last_update2017-08-20 11:12:48
depth2
children0
last_payout2017-08-27 11:12:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation6,344,336,061,337,513
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,338,844
net_rshares218,982,157
author_curate_reward""
vote details (1)
@kitcat ·
upvoted resteemed and followed
properties (22)
authorkitcat
permlinkre-oflyhigh-python3-and-gil-20170820t115321428z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 11:53:21
last_update2017-08-20 11:53:21
depth1
children0
last_payout2017-08-27 11:53:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation33,063,379,747,116
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,341,100
net_rshares0
@kresho1 ·
Python is in top 3. programming languages in world. Love programming with Python. :)
properties (22)
authorkresho1
permlinkre-oflyhigh-python3-and-gil-20170820t200523101z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 20:05:24
last_update2017-08-20 20:05:24
depth1
children0
last_payout2017-08-27 20:05:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length84
author_reputation0
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,376,484
net_rshares0
@lifeisfun ·
Thats a great Articles...but if anybody has answer to the following question it will be great help..

https://steemit.com/facebook/@lifeisfun/question-making-money-with-no-of-likes-on-facebook-for-steemit-posts
properties (22)
authorlifeisfun
permlinkre-oflyhigh-python3-and-gil-20170820t155317361z
categorycn
json_metadata{"tags":["cn"],"links":["https://steemit.com/facebook/@lifeisfun/question-making-money-with-no-of-likes-on-facebook-for-steemit-posts"],"app":"steemit/0.1"}
created2017-08-20 15:52:24
last_update2017-08-20 15:52:24
depth1
children0
last_payout2017-08-27 15:52:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length210
author_reputation1,962,145,227
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,357,920
net_rshares0
@lydiachan ·
以前曾有一堂課有上過一些些程式語言, 結果那堂課果不其然的得重學.... XDD
曾經聽說過以前朋友在學B、C語言的,聽說那些程式語言都是他們的噩夢啊...
properties (22)
authorlydiachan
permlinkre-oflyhigh-python3-and-gil-20170821t095403677z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-21 09:54:54
last_update2017-08-21 09:54:54
depth1
children0
last_payout2017-08-28 09:54:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length78
author_reputation38,600,108,764,289
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,422,160
net_rshares0
@mamamyanmar ·
like
properties (22)
authormamamyanmar
permlinkre-oflyhigh-2017820t19272881z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 12:57:06
last_update2017-08-20 12:57:06
depth1
children0
last_payout2017-08-27 12:57:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4
author_reputation14,121,891,848,891
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,345,320
net_rshares0
@muhajirnyakcut ·
$0.76
I do not understand your language,
But I know what python is
👍  
properties (23)
authormuhajirnyakcut
permlinkre-oflyhigh-python3-and-gil-20170820t184332714z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 18:43:39
last_update2017-08-20 18:43:39
depth1
children0
last_payout2017-08-27 18:43:39
cashout_time1969-12-31 23:59:59
total_payout_value0.573 HBD
curator_payout_value0.191 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length60
author_reputation193,360,099,051
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,371,198
net_rshares200,724,730,551
author_curate_reward""
vote details (1)
@powerfj ·
$2.64
Python的线程好像是有点蛋疼, 如果是CPU密集型的任务, 应该直接进程就好了, 大部分时候是跑满CPU核数, 如果是IO密集型的, 目前大部分都用Event Loop模型了
👍  , , ,
properties (23)
authorpowerfj
permlinkre-oflyhigh-python3-and-gil-20170820t130808528z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 13:08:09
last_update2017-08-20 13:08:09
depth1
children2
last_payout2017-08-27 13:08:09
cashout_time1969-12-31 23:59:59
total_payout_value2.425 HBD
curator_payout_value0.211 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length89
author_reputation1,712,765,353,203
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,346,039
net_rshares702,372,376,313
author_curate_reward""
vote details (4)
@mmansooramin ·
follow for free coupons

https://steemit.com/@mmansooramin
properties (22)
authormmansooramin
permlinkre-powerfj-re-oflyhigh-python3-and-gil-20170821t081754607z
categorycn
json_metadata{"tags":["cn"],"links":["https://steemit.com/@mmansooramin"],"app":"steemit/0.1"}
created2017-08-21 08:17:54
last_update2017-08-21 08:17:54
depth2
children0
last_payout2017-08-28 08:17:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation543,916,612
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,416,608
net_rshares0
@oflyhigh ·
感谢分享
慢慢摸索中
properties (22)
authoroflyhigh
permlinkre-powerfj-re-oflyhigh-python3-and-gil-20170820t131844438z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 13:18:45
last_update2017-08-20 13:18:45
depth2
children0
last_payout2017-08-27 13:18:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation6,344,336,061,337,513
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,346,702
net_rshares0
@sharoon ·
very nice post  even i don,t know Chines
properties (22)
authorsharoon
permlinkre-oflyhigh-python3-and-gil-20170820t141635979z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 14:16:36
last_update2017-08-20 14:16:36
depth1
children0
last_payout2017-08-27 14:16:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length40
author_reputation-330,640,444,933
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,350,978
net_rshares0
@siddm96 ·
Python is awesome.
properties (22)
authorsiddm96
permlinkre-oflyhigh-python3-and-gil-20170820t174616581z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 17:46:15
last_update2017-08-20 17:46:15
depth1
children0
last_payout2017-08-27 17:46:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18
author_reputation561,667,554,662
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,366,931
net_rshares0
@steemboad · (edited)
좋은 게시물. 우리가 인도 할 수 있을까요? 고마워.
properties (22)
authorsteemboad
permlinkre-oflyhigh-2017820t194229398z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 12:42:36
last_update2017-08-20 12:59:39
depth1
children0
last_payout2017-08-27 12:42:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation-123,231,333,505
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,344,298
net_rshares0
@steemian69 ·
I Never Really Liked Python But One Thing I Like About It Is Not Having Any ";" Lol If You Know What I Mean :)
properties (22)
authorsteemian69
permlinkre-oflyhigh-python3-and-gil-20170821t071934792z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-21 08:20:12
last_update2017-08-21 08:20:12
depth1
children0
last_payout2017-08-28 08:20:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length110
author_reputation1,160,052,362,678
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,416,733
net_rshares0
@stefanarnaut ·
Python is the best programming language
properties (22)
authorstefanarnaut
permlinkre-oflyhigh-python3-and-gil-20170820t143901282z
categorycn
json_metadata{"tags":["cn"],"app":"steemit/0.1"}
created2017-08-20 14:39:00
last_update2017-08-20 14:39:00
depth1
children0
last_payout2017-08-27 14:39:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation379,128,940,096
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,352,628
net_rshares0
@syahrul ·
@oflyhigh Good article, very weighty to be reviewed.
Information is very important for the lovers pemograman.
👍  
properties (23)
authorsyahrul
permlinkre-oflyhigh-python3-and-gil-20170820t115155833z
categorycn
json_metadata{"tags":["cn"],"users":["oflyhigh"],"app":"steemit/0.1"}
created2017-08-20 11:52:33
last_update2017-08-20 11:52:33
depth1
children0
last_payout2017-08-27 11:52:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length109
author_reputation11,742,167,665
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,341,052
net_rshares237,675,755
author_curate_reward""
vote details (1)
@yooraa ·
$0.99
Great posts can be useful can be an experience. Hopefully be a friend who can help me to like you ..... to dream and hope to be achieved. Like @yooraa need friend support. Best regards.
👍  ,
properties (23)
authoryooraa
permlinkre-oflyhigh-2017821t03610905z
categorycn
json_metadata{"tags":"cn","app":"esteem/1.4.6","format":"markdown+html","community":"esteem"}
created2017-08-20 17:36:15
last_update2017-08-20 17:36:15
depth1
children0
last_payout2017-08-27 17:36:15
cashout_time1969-12-31 23:59:59
total_payout_value0.735 HBD
curator_payout_value0.256 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length185
author_reputation560,660,454,067
root_title"Python3 线程 & GIL 学习笔记"
beneficiaries
0.
accountesteemapp
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,366,192
net_rshares273,432,379,207
author_curate_reward""
vote details (2)