2005年05月27日 星期五 11:22
Neo Chan£¬ÄãºÃ ÎÒÓöµ½µÄÇé¿öÊÇÕâÑùµÄ¡£ÎÒдÁËÒ»¸öÍø¹Ø½ÓÈë³ÌÐò£¬µ÷ÓñðÈËдºÃµÄÒ»¸ödll£¬ÆäÖÐÓÐÒ»¸ö·½·¨ÊÇÓÃÀ´½ÓÊÕÐÅÏ¢µÄ£¬Õâ¸ö·½·¨ÊÇÓÐÎÊÌâµÄ¡£µ±Íø¹ØûÓÐÐÅϢʱºòËü»áÒ»Ö±µÈ´ý¡£ÕâʱËü²»ÊÍ·ÅGIL£¬¶øÎÒ»¹ÓÐÒ»¸ö·¢ËÍỊ̈߳¬µ±½ÓÊÕ½ÓÊÕÏß³ÌÒ»Ö±ÔڵȴýÐÅÏ¢µÄʱºò£¬·¢ËÍÏß³ÌÆð²»À´¡£ËùÒÔÎҸоõÓÐЩÎÊÌâ¡£ Carambo £¬ qutr at tjub.com.cn 2005-5-27 ----- ÊÕµ½ÒÔÏÂÀ´ÐÅÄÚÈÝ ----- ·¢¼þÈË: Neo Chan ÊÕ¼þÈË: qutr,python-chinese ʱ ¼ä: 2005-05-27, 10:55:25 Ö÷ Ìâ: RE: [python-chinese] ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ æç¨è¿çº¿ç¨ï¼æ²¡æä½ è¯´çé®é¢ãããä¸è¿æ没æåè¿æ»å¾ªç¯ããï¼ï¼?/span> æ认为线ç¨ä¹é´æ¯åæ¶çãåé æ¶é´ããå³ä½¿ä»æ?/span>while 1: ä¹ä¼è®©ä»sleepä¸ä¸ããå»è¿è¡ ä¸ä¸ä¸ªçº¿ç¨ãã?/span> å¦æä½ çé®é¢ä¸è½è§£å³ããä½ å¯ä»¥ç¨å¦ä¸ç§æ¹æ³ããå°±æ?/span>forkè¿ç¨ãã两个è¿ç¨æ¯ä¸ä¼åºç°ä½ 说çæ åµçãã?/span> From: python-chinese-bounces at lists.python.cn [mailto:python-chinese-bounces at lists.python.cn] On Behalf Of Carambo Sent: Friday, May 27, 2005 10:23 AM To: python-chinese Subject: [python-chinese] æ对 Python å¤çº¿ç¨çä¸ç¹çè§£ï¼ python-chinese : ããå¤§å®¶å¥½ï¼ Pythonç线ç¨æ¯ç?font face="Times New Roman">Pythonçâå ¨å±è§£éå¨éâï¼Global Interpreter Lockï¼?font face="Times New Roman"> GILï¼æ¥æ§å¶çï¼å¦æä¸ä¸ªç¨åºä¸å å«å¤ä¸ªæ£å¨è¿è¡ç线ç¨ï¼ä»ä»¬å°æ ¹æ®æå®çæ¶é´é´éä¾æ¬¡è¿å ¥å离å¼è§£éå¨ã?font face="Times New Roman">GILå¨æ¯ä¸æ¶å»åªè¿è¡ä¸ä¸ªçº¿ç¨ï¼GILæ¯æ¬¡å¯ç¨æ¶ï¼é½ä¼æå个线ç¨å å«çä»ãï¼ä»¥ä¸æ¯ã?font face="Times New Roman">Pythonç¼ç¨ç»å ¸ãä¸çä¸æ®µæå½ï¼ æç §è¿æ ·çç解ï¼å°±æ¯è¯´å¦ææçç¨åºéæä¸ä¸ªä¸»çº¿ç¨å两个å线ç¨ï¼å½ä¸»çº¿ç¨è¿è¡æ¶å¯å¨ä¸¤ä¸ªå线ç¨ï¼å½å ¶ä¸çä¸ä¸ªå线ç¨éæä¸ä¸ªæ»å¾ªç¯æ¶é£ä¹ä»æ°¸è¿å¤äºrunningç¶æï¼é£ä¹è¿æ¶å?font face="Times New Roman">GILå¾ä¸å°éæ¾ï¼é£ä¹å¦ä¸ä¸ªå线ç¨ä¹å°±å¾ä¸å?font face="Times New Roman">GILä»å°±æ°¸è¿è¿è¡ä¸èµ·æ¥ãä»è¿ä¸ç¹ä¸è¯´ï¼Pythonç线ç¨æ¯æé®é¢çãæå¨å®é ç项ç®ä¸ç¡®å®ç¢°å°è¿è¿ä¸ªé®é¢ã?span lang=EN-US> ä¸ç¥é大家æ¯æä¹ççï¼è°è½å¸®ææ´å¥½çç解ä¸ä¸ï¼ Caramboï¼?span lang=EN-US> qutr at tjub.com.cn 2005-5-27 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050527/c11a45ef/attachment.html
2005年05月27日 星期五 11:32
DQoJtaW+zdXiz9bP88C0v7SjrNKysrvE3Mi3tqi+zcrHcHl0aG9u19TJ7bXEz9+zzLX3ytTOyszi sMmho9Ky09C/ycTcysfG5Mv81K3S8qGjDQoNCj09PT09PT0gMjAwNS0wNS0yNyAxMToyMjowNCBD YXJhbWJvIHdyb3RlOiA9PT09PT09DQoNCj5OZW8gQ2hhbqOsxOO6ww0KPs7S0/a1vbXEx+m/9srH 1eLR+bXEoaPO0tC0wcvSu7j2zfi52L3TyOuzzNDyo6y199PDsfDIy9C0usO1xNK7uPZkbGyjrMbk 1tDT0NK7uPa3vbeoysfTw8C0vdPK1dDFz6K1xKOs1eK49re9t6jKx9PQzsrM4rXEoaO1sc34udjD u9PQ0MXPosqxuvLL/Lvh0rvWsbXItP2ho9XiyrHL/LK7ys23xUdJTKOstvjO0ru509DSu7j2t6LL zc/fs8yjrLWxvdPK1b3TytXP37PM0rvWsdTatci0/dDFz6K1xMqxuvKjrLeiy83P37PMxvCyu8C0 oaPL+dLUztK40L7109DQqc7KzOKhow0KPg0KPkNhcmFtYm8go6wgcXV0ckB0anViLmNvbS5jbiAN Cj4yMDA1LTUtMjcgDQo+LS0tLS0gytW1vdLUz8LAtNDFxNrI3SAtLS0tLSANCj63orz+yMs6IE5l byBDaGFuIA0KPsrVvP7IyzogcXV0cixweXRob24tY2hpbmVzZSANCj7KsSAgvOQ6IDIwMDUtMDUt MjcsIDEwOjU1OjI1DQo+1vcgIMziOiBSRTogW3B5dGhvbi1jaGluZXNlXSDO0rbUIFB5dGhvbiC2 4M/fs8y1xNK7tePA7b3io6ENCj4NCj4NCj4NCj7miJHnlKjov4fnur/nqIvvvIzmsqHmnInkvaDo r7TnmoTpl67popjjgILjgILjgILkuI3ov4fmiJHmsqHmnInlm57ov4fmrbvlvqrnjq/jgILjgILv vJrvvD8vc3Bhbj4NCj7miJHorqTkuLrnur/nqIvkuYvpl7TmmK/liIbml7bnmoTjgILliIbphY3m l7bpl7TjgILjgILljbPkvb/ku5bmmD8vc3Bhbj53aGlsZSAxOiDkuZ/kvJrorqnku5ZzbGVlcOS4 gOS4i+OAguOAguWOu+i/kOihjCDkuIvkuIDkuKrnur/nqIvjgILjgD8vc3Bhbj4NCj4NCj7lpoLm npzkvaDnmoTpl67popjkuI3og73op6PlhrPjgILjgILkvaDlj6/ku6XnlKjlj6bkuIDnp43mlrnm s5XjgILjgILlsLHmmD8vc3Bhbj5mb3Jr6L+b56iL44CC44CC5Lik5Liq6L+b56iL5piv5LiN5Lya 5Ye6546w5L2g6K+055qE5oOF5Ya155qE44CC44A/L3NwYW4+DQo+DQo+DQo+DQo+RnJvbTogcHl0 aG9uLWNoaW5lc2UtYm91bmNlc0BsaXN0cy5weXRob24uY24gW21haWx0bzpweXRob24tY2hpbmVz ZS1ib3VuY2VzQGxpc3RzLnB5dGhvbi5jbl0gT24gQmVoYWxmIE9mIENhcmFtYm8NCj5TZW50OiBG cmlkYXksIE1heSAyNywgMjAwNSAxMDoyMyBBTQ0KPlRvOiBweXRob24tY2hpbmVzZQ0KPlN1Ympl Y3Q6IFtweXRob24tY2hpbmVzZV0g5oiR5a+5IFB5dGhvbiDlpJrnur/nqIvnmoTkuIDngrnnkIbo p6PvvIENCj4NCj5weXRob24tY2hpbmVzZSA6DQo+DQo+44CA44CA5aSn5a625aW977yBDQo+DQo+ UHl0aG9u55qE57q/56iL5piv55Q/Zm9udCBmYWNlPSJUaW1lcyBOZXcgUm9tYW4iPlB5dGhvbuea hOKAnOWFqOWxgOino+mHiuWZqOmUgeKAne+8iEdsb2JhbCBJbnRlcnByZXRlciBMb2Nr77w/Zm9u dCBmYWNlPSJUaW1lcyBOZXcgUm9tYW4iPiBHSUzvvInmnaXmjqfliLbnmoTvvIzlpoLmnpzkuIDk uKrnqIvluo/kuK3ljIXlkKvlpJrkuKrmraPlnKjov5DooYznmoTnur/nqIvvvIzku5bku6zlsIbm oLnmja7mjIflrprnmoTml7bpl7Tpl7TpmpTkvp3mrKHov5vlhaXlkoznprvlvIDop6Pph4rlmajj gD9mb250IGZhY2U9IlRpbWVzIE5ldyBSb21hbiI+R0lM5Zyo5q+P5LiA5pe25Yi75Y+q6L+Q6KGM 5LiA5Liq57q/56iL77yMR0lM5q+P5qyh5Y+v55So5pe277yM6YO95Lya5pyJ5Y2V5Liq57q/56iL 5YyF5ZCr552A5LuW44CC77yI5Lul5LiK5piv44A/Zm9udCBmYWNlPSJUaW1lcyBOZXcgUm9tYW4i PlB5dGhvbue8lueoi+e7j+WFuOOAi+S4iueahOS4gOauteaRmOW9le+8iQ0KPg0KPuaMieeFp+i/ meagt+eahOeQhuino++8jOWwseaYr+ivtOWmguaenOaIkeeahOeoi+W6j+mHjOacieS4gOS4quS4 u+e6v+eoi+WSjOS4pOS4quWtkOe6v+eoi++8jOW9k+S4u+e6v+eoi+i/kOihjOaXtuWQr+WKqOS4 pOS4quWtkOe6v+eoi++8jOW9k+WFtuS4reeahOS4gOS4quWtkOe6v+eoi+mHjOacieS4gOS4quat u+W+queOr+aXtumCo+S5iOS7luawuOi/nOWkhOS6jnJ1bm5pbmfnirbmgIHvvIzpgqPkuYjov5nm l7blgD9mb250IGZhY2U9IlRpbWVzIE5ldyBSb21hbiI+R0lM5b6X5LiN5Yiw6YeK5pS+77yM6YKj 5LmI5Y+m5LiA5Liq5a2Q57q/56iL5Lmf5bCx5b6X5LiN5Yg/Zm9udCBmYWNlPSJUaW1lcyBOZXcg Um9tYW4iPkdJTOS7luWwseawuOi/nOi/kOihjOS4jei1t+adpeOAguS7jui/meS4gOeCueS4iuiv tO+8jFB5dGhvbueahOe6v+eoi+aYr+aciemXrumimOeahOOAguaIkeWcqOWunumZheeahOmhueeb ruS4reehruWunueisOWIsOi/h+i/meS4qumXrumimOOAP3NwYW4gbGFuZz1FTi1VUz4NCj4NCj7k uI3nn6XpgZPlpKflrrbmmK/mgI7kuYjnnIvnmoTvvIzosIHog73luK7miJHmm7Tlpb3nmoTnkIbo p6PkuIDkuIvvvJ8NCj4NCj4NCj4NCj4NCj5DYXJhbWJv77w/c3BhbiBsYW5nPUVOLVVTPiBxdXRy QHRqdWIuY29tLmNuDQo+MjAwNS01LTI3IA0KPl9fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fDQo+cHl0aG9uLWNoaW5lc2UgbGlzdA0KPnB5dGhvbi1jaGluZXNl QGxpc3RzLnB5dGhvbi5jbg0KPmh0dHA6Ly9weXRob24uY24vbWFpbG1hbi9saXN0aW5mby9weXRo b24tY2hpbmVzZQ0KPg0KDQo9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0N CgkJCQ0KQmVzdCByZWdhcmRzLA0KDQqhoaGhoaGhoaGhoaGhoaGhQnJ1Y2UgV2hvDQqhoaGhoaGh oaGhoaGhoaGhoaGhoTIwMDUtMDUtMjcNCg0K
2005年05月27日 星期五 12:36
On 5/27/05, Carambo <qutr at tjub.com.cn> wrote: > Neo Chan,你好 > 我遇到的情况是这样的。我写了一个网关接入程序,调用别人写好的一个dll,其中有一个方法是用来接收信息的,这个方法是有问题的。当网关没有信息时候它会一直等待。这时它不释放GIL,而我还有一个发送线程,当接收接收线程一直在等待信息的时候,发送线程起不来。所以我感觉有些问题。 GIL只有在python bytecode结束后才可能解锁。你调用别人的DLL的方法,在函数返回前,控制权在DLL中的C代码手中,在这种情况下python解释器得不到控制权,就无法释放GIL。 -- Qiangning Hong Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=67907&t=1>
2005年05月27日 星期五 14:24
Äã˵µÄÎÊÌâµÄ¹Ø¼üÊÇpythonÏß³ÌÊÇ·ñ¿É°þ¶á,Ò²¾ÍÊǼ´Ê¹Ò»¸öÏ̲߳»Ö÷¶¯·ÅÆúcpu,µ÷¶ÈÕß Ò²ÄÜ°þ¶áËüµÄÔËÐÐȨ.°´ÕÕÄã¸øµÄÉÏ˵µÄ,ÿ¸öpythonÏß³ÌÔËÐÐÒ»¸öʱ ¼äƬ,ʱ¼äƬµ½ÁË,Ëü¾Í»á±»°þ¶ácpuʹÓÃȨ,ËùÒÔÓ¦¸ÃÊÇ¿É°þ¶áµÄ.ÄãµÄÎÊÌâÓ¦¸ÃÊÇ×Ô¼º³Ì ÐòµÄÎÊÌâ,ÓëpyhonµÄÏ̲߳ßÂÔÎÞ¹Ø. -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: "Bruce Who" <whoonline at msn.com> To: "python-cn-google" <python-cn at googlegroups.com>, "pythonÖÐÎÄÓʼþ×é" <python-chinese at lists.python.cn> Sent: Fri, 27 May 2005 11:32:44 +0800 Subject: RE: [python-chinese] ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ > µ¥¾ÍÕâÏÖÏóÀ´¿´£¬Ò²²»ÄÜÈ·¶¨¾ÍÊÇpython×ÔÉíµÄÏ̵߳÷ÊÔÎÊÌâ°É¡£Ò²ÓпÉÄÜÊÇÆäËüÔ Òò¡£ > > ======= 2005-05-27 11:22:04 Carambo wrote: ======= > > >Neo Chan£¬ÄãºÃ > >ÎÒÓöµ½µÄÇé¿öÊÇÕâÑùµÄ¡£ÎÒдÁËÒ»¸öÍø¹Ø½ÓÈë³ÌÐò£¬µ÷ÓñðÈËдºÃµÄÒ»¸ödll£¬ÆäÖÐ ÓÐÒ»¸ö·½·¨ÊÇÓÃÀ´½ÓÊÕÐÅÏ¢µÄ£¬Õâ¸ö·½·¨ÊÇÓÐÎÊÌâµÄ¡£µ±Íø¹ØûÓÐÐÅϢʱºòËü»áÒ»Ö±µÈ ´ý¡£ÕâʱËü²»ÊÍ·ÅGIL£¬¶øÎÒ»¹ÓÐÒ»¸ö·¢ËÍỊ̈߳¬µ±½ÓÊÕ½ÓÊÕÏß³ÌÒ»Ö±ÔڵȴýÐÅÏ¢µÄʱ ºò£¬·¢ËÍÏß³ÌÆð²»À´¡£ËùÒÔÎҸоõÓÐЩÎÊÌâ¡£ > > > >Carambo £¬ qutr at tjub.com.cn > >2005-5-27 > >----- ÊÕµ½ÒÔÏÂÀ´ÐÅÄÚÈÝ ----- > >·¢¼þÈË: Neo Chan > >ÊÕ¼þÈË: qutr,python-chinese > >ʱ ¼ä: 2005-05-27, 10:55:25 > >Ö÷ Ìâ: RE: [python-chinese] ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ > > > > > > > >æç¨è¿çº¿ç¨‹ï¼æ²¡æä½ è¯´çé®é¢ãããä¸è¿æ没æ?#155;è¿ æ»å¾ªç¯ããï¼ï¼?/span> > >æ认为线程之é´æ¯åæ¶çãåé æ¶é´ããå³ä½¿ä» æ?/span>while 1: ä¹ä¼è®©ä»sleepä¸ä¸‹ããå»è¿è¡ 下ä¸ä¸ªçº¿ç¨‹ãã ?/span> > > > >å¦æä½ çé®é¢ä¸è½è§£å³ããä½ å¯ä»¥ç¨å¦ä¸ç§æ¹æ³ããå°± æ?/span>fork进程ãã两个è?#155;程æ¯ä¸ä¼åºç°ä½ 说çæ åµçã ã?/span> > > > > > > > >From: python-chinese-bounces at lists.python.cn [mailto:python-chinese- bounces at lists.python.cn] On Behalf Of Carambo > >Sent: Friday, May 27, 2005 10:23 AM > >To: python-chinese > >Subject: [python-chinese] æ对 Python å¤çº¿ç¨‹çä¸ç¹çè§£ï¼ > > > >python-chinese : > > > >ããå¤§å®¶å¥½ï¼ > > > >Pythonç线程æ¯ç?font face="Times New Roman">Pythonçâå ¨å±è§£éå ¨éâï¼Global Interpreter Lockï¼?font face="Times New Roman"> GILï¼æ¥æ§å ¶çï¼å¦æä¸ä¸ªç?#139;åºä¸å å«å¤ä¸ªæ£å¨è¿è¡ç线程ï¼ä»ä»¬å °æ ¹æ®æå®çæ¶é´é´éä¾æ¬¡è?#155;å ¥å离å¼è§£éå¨ã?font face="Times New Roman">GILå¨æ¯ä¸æ¶å»åªè¿è¡ä¸ä¸ªçº¿ç¨‹ï¼GILæ¯æ¬¡å ¯ç¨æ¶ï¼é½ä¼æå个线程å å«çä»ãï¼ä»¥ä¸æ¯ã?font face="Times New Roman">Pythonç¼ç?#139;ç»å ¸ã‹ä¸çä¸æ®µæå½ï¼ > > > >æç §è¿æ ·çç解ï¼å°±æ¯è¯´å¦ææçç?#139;åºéæä¸ä¸ªä¸»çº ¿ç?#139;å两个å线ç?#139;ï¼å½ä¸»çº¿ç¨‹è¿è¡æ¶å¯å¨ä¸¤ä¸ªå线ç? #139;ï¼å½å ¶ä¸çä¸ä¸ªå线ç?#139;éæä¸ä¸ªæ»å¾ªç¯æ¶é£ä¹ä»æ°¸è ¿å¤äºrunningç¶æï¼é£ä¹è¿æ¶å?font face="Times New Roman">GILå¾ä¸ å°éæ¾ï¼é£ä¹å¦ä¸ä¸ªå线ç?#139;ä¹å°±å¾ä¸å?font face="Times New Roman">GILä»å°±æ°¸è¿è¿è¡ä¸èµ·æ¥ãä»è¿ä¸ç¹ä¸è¯´ï¼Pythonç线 程æ¯æé®é¢çãæå¨å®é ç项目ä¸ç¡®å®ç¢°å°è¿è¿ä¸ªé®é¢ã? span lang=EN-US> > > > >ä¸ç¥é大家æ¯æä¹ç‹çï¼è°è½å¸®æ?#155;´å¥½çç解ä¸ä¸‹ï¼? > > > > > > > > > >Caramboï¼?span lang=EN-US> qutr at tjub.com.cn > >2005-5-27 > >_______________________________________________ > >python-chinese list > >python-chinese at lists.python.cn > >http://python.cn/mailman/listinfo/python-chinese > > > > = = = = = = = = = = = = = = = = = = = = > > Best regards, > > ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Bruce Who > ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-05-27 ------- End of Original Message -------
2005年05月27日 星期五 14:34
ºÇºÇ,¸ÅÄî»ìÂÒ,¸´Ï°ÁËһϲÙ×÷ϵͳ,·¢ÏÖ×Ô¼º¸ÅÄî»ìÂÒ. pythonÊÇ·ÖʱµÄ(¸ù¾ÝËùÑÔ),ÿ¸öÏß³ÌÒ»¸öʱ¼äƬ,ʱ¼äƬµ½ÁË,¾Í»á·¢ ÉúÏ̵߳÷¶È.ËùÒÔÓ¦¸Ã²»»á³öÏÖÄã˵µÄÎÊÌâ. ÖÁÓÚ¿É°þ¶á,Òâ˼Êǵ±ÓÐÏß³ÌÓÅÏȼ¶¸ßÓÚÕýÔÚÔËÐеÄÏ̵߳ÄÓÅÏȼ¶Ê±,Ò²»á·¢ÉúÏ̵߳÷¶È, ¸Õ²ÅµÄemail˵´íÁË,¸üÕýÒ»ÏÂ. -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: "byj" <byj at net.pku.edu.cn> To: python-chinese at lists.python.cn Sent: Fri, 27 May 2005 14:24:49 +0800 Subject: RE: [python-chinese] ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ > Äã˵µÄÎÊÌâµÄ¹Ø¼üÊÇpythonÏß³ÌÊÇ·ñ¿É°þ¶á, > Ò²¾ÍÊǼ´Ê¹Ò»¸öÏ̲߳»Ö÷¶¯·ÅÆúcpu,µ÷¶ÈÕß > Ò²ÄÜ°þ¶áËüµÄÔËÐÐȨ.°´ÕÕÄã¸øµÄ ÉÏ˵µÄ,ÿ¸öpythonÏß³ÌÔËÐÐÒ»¸ö ʱ > ¼äƬ,ʱ¼äƬµ½ÁË,Ëü¾Í»á±»°þ¶ácpuʹÓÃȨ,ËùÒÔÓ¦¸ÃÊÇ¿É°þ¶áµÄ.ÄãµÄÎÊÌâÓ¦¸ÃÊÇ×Ô¼º ³Ì > ÐòµÄÎÊÌâ,ÓëpyhonµÄÏ̲߳ßÂÔÎÞ¹Ø. > -- > Open WebMail Project (http://openwebmail.org) > > ---------- Original Message ----------- > From: "Bruce Who" <whoonline at msn.com> > To: "python-cn-google" <python-cn at googlegroups.com>, > "pythonÖÐÎÄÓʼþ×é" <python-chinese at lists.python.cn> > Sent: Fri, 27 May 2005 11:32:44 +0800 Subject: RE: [python-chinese] > ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ > > > µ¥¾ÍÕâÏÖÏóÀ´¿´£¬Ò²²»ÄÜÈ·¶¨¾ÍÊÇpython×ÔÉíµÄÏ̵߳÷ÊÔÎÊÌâ°É¡£Ò²ÓпÉÄÜÊÇÆäËü Ô > Òò¡£ > > > > ======= 2005-05-27 11:22:04 Carambo wrote: ======= > > > > >Neo Chan£¬ÄãºÃ > > >ÎÒÓöµ½µÄÇé¿öÊÇÕâÑùµÄ¡£ÎÒдÁËÒ»¸öÍø¹Ø½ÓÈë³ÌÐò£¬µ÷ÓñðÈËдºÃµÄÒ»¸ödll£¬Æä ÖÐ > ÓÐÒ»¸ö·½·¨ÊÇÓÃÀ´½ÓÊÕÐÅÏ¢µÄ£¬Õâ¸ö·½·¨ÊÇÓÐÎÊÌâµÄ¡£µ±Íø¹ØûÓÐÐÅϢʱºòËü»áÒ»Ö± µÈ > ´ý¡£ÕâʱËü²»ÊÍ·ÅGIL£¬¶øÎÒ»¹ÓÐÒ»¸ö·¢ËÍỊ̈߳¬µ±½ÓÊÕ½ÓÊÕÏß³ÌÒ»Ö±ÔڵȴýÐÅÏ¢µÄʱ > ºò£¬·¢ËÍÏß³ÌÆð²»À´¡£ËùÒÔÎҸоõÓÐЩÎÊÌâ¡£ > > > > > >Carambo £¬ qutr at tjub.com.cn > > >2005-5-27 > > >----- ÊÕµ½ÒÔÏÂÀ´ÐÅÄÚÈÝ ----- > > >·¢¼þÈË: Neo Chan > > >ÊÕ¼þÈË: qutr,python-chinese > > >ʱ ¼ä: 2005-05-27, 10:55:25 > > >Ö÷ Ìâ: RE: [python-chinese] ÎÒ¶Ô Python ¶àÏ̵߳ÄÒ»µãÀí½â£¡ > > > > > > > > > > > >æç¨è¿çº¿ç¨‹ï¼æ²¡æä½ è¯´çé®é¢ãããä¸è¿æ没æ? #155;è¿ > æ»å¾ªç¯ããï¼ï¼?/span> > > >æ认为线程之é´æ¯åæ¶çãåé æ¶é´ããå³ä½ ¿ä» > æ?/span>while 1: ä¹ä¼è®©ä»sleepä¸ä¸‹ããå»è¿è¡ ä¸‹ä¸ ä¸ªçº¿ç¨‹ãã > ?/span> > > > > > >å¦æä½ çé®é¢ä¸è½è§£å³ããä½ å¯ä»¥ç¨å¦ä¸ç§æ¹æ³ããå°± > æ?/span>fork进程ãã两个è?#155;程æ¯ä¸ä¼åºç°ä ½ 说çæ åµçã > ã?/span> > > > > > > > > > > > >From: python-chinese-bounces at lists.python.cn [mailto:python-chinese- > bounces at lists.python.cn] On Behalf Of Carambo > > >Sent: Friday, May 27, 2005 10:23 AM > > >To: python-chinese > > >Subject: [python-chinese] æ对 Python å¤çº¿ç¨‹çä¸ç¹çè§£ï ¼ > > > > > >python-chinese : > > > > > >ããå¤§å®¶å¥½ï¼ > > > > > >Pythonç线程æ¯ç?font face="Times New Roman">Pythonçâå ¨å± è§£éå > ¨éâï¼Global Interpreter Lockï¼?font face="Times New Roman"> GILï¼æ¥ æ§å > ¶çï¼å¦æä¸ä¸ªç?#139;åºä¸å å«å¤ä¸ªæ£å¨è¿è¡ççº¿ç¨‹ï¼ ä»ä»¬å > °æ ¹æ®æå®çæ¶é´é´éä¾æ¬¡è?#155;å ¥å离å¼è§£éå¨ã?font face="Times New Roman">GILå¨æ¯ä¸æ¶å»åªè¿è¡ä¸ä¸ªçº¿ç¨‹ï¼GILæ¯ æ¬¡å ¯ç¨æ¶ï¼é½ä¼æå个线程å å«çä»ãï¼ä»¥ä¸æ¯ã? font face="Times New Roman">Pythonç¼ç?#139;ç»å ¸ã‹ä¸çä¸æ®µæå½ ï¼ > > > > > >æç §è¿æ ·çç解ï¼å°±æ¯è¯´å¦ææçç?#139;åºéæä¸ä¸ªä¸»çº > ¿ç?#139;å两个å线ç?#139;ï¼å½ä¸»çº¿ç¨‹è¿è¡æ¶å¯å¨ä¸¤ä¸ªå 线ç? > #139;ï¼å½å ¶ä¸çä¸ä¸ªå线ç?#139;éæä¸ä¸ªæ»å¾ªç¯æ¶é£ä¹ä»æ° ¸è > ¿å¤äºrunningç¶æï¼é£ä¹è¿æ¶å?font face="Times New Roman">GILå¾ä ¸ > å°éæ¾ï¼é£ä¹å¦ä¸ä¸ªå线ç?#139;ä¹å°±å¾ä¸å?font > face="Times New Roman">GILä»å°±æ°¸è¿è¿è¡ä¸èµ·æ¥ãä»è¿ä¸ç¹ä¸è¯´ï ¼Pythonç线 > 程æ¯æé®é¢çãæå¨å®é ç项目ä¸ç¡®å®ç¢°å°è¿è¿ 个é®é¢ã? > span lang=EN-US> > > > > > >ä¸ç¥é大家æ¯æä¹ç‹çï¼è°è½å¸®æ?#155;´å¥½ççè§£ä ¸ä¸‹ï¼? > > > > > > > > > > > > > > >Caramboï¼?span lang=EN-US> qutr at tjub.com.cn > > >2005-5-27 > > >_______________________________________________ > > >python-chinese list > > >python-chinese at lists.python.cn > > >http://python.cn/mailman/listinfo/python-chinese > > > > > > > = = = = = = = = = = = = = = = = = = = = > > > > Best regards, > > > > ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Bruce Who > > ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-05-27 > ------- End of Original Message ------- > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese ------- End of Original Message -------
2005年05月27日 星期五 14:43
On 5/27/05, byj <byj at net.pku.edu.cn> wrote: > 呵呵,概念混乱,复习了一下操作系统,发现自己概念混乱. > python是分时的(根据所言),每个线程一个时间片,时间片到了,就会发 > 生线程调度.所以应该不会出现你说的问题. 他的问题是在C调用中被阻断,控制权无法回到python解释器,就无法进行线程调度,因此另一个python线程就始终不能被执行。python线程切换是只能在bytecode级别的,不像操作系统线程是在machine code级别。 > 至于可剥夺,意思是当有线程优先级高于正在运行的线程的优先级时,也会发生线程调度, > 刚才的email说错了,更正一下. python线程没有优先级概念,这也是python对多线程支持不够完美的地方之一。 -- Qiangning Hong Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=67907&t=1>
2005年05月27日 星期五 19:44
ÓеãÀí½âÁË,ÎÒºÃÏñÒ²Óöµ½ÁËͬÑùµÄÎÊÌâ,¶à¸öÏ̵߳ÄÍøÂç·þÎñ,ʼÖÕÖ»ÄÜÔËÐÐÒ»¸öÏß³Ì. -- Open WebMail Project (http://openwebmail.org) ---------- Original Message ----------- From: Qiangning Hong <hongqn at gmail.com> To: python-chinese at lists.python.cn Sent: Fri, 27 May 2005 14:43:20 +0800 Subject: Re: [python-chinese] æ对 Python å¤çº¿ï¿½ç°?#155;åæ·æ«çï ¿½ > On 5/27/05, byj <byj at net.pku.edu.cn> wrote: > > ºÇºÇ,¸ÅÄî»ìÂÒ,¸´Ï°ÁËһϲÙ×÷ϵͳ,·¢ÏÖ×Ô¼º¸ÅÄî»ìÂÒ. > > pythonÊÇ·ÖʱµÄ(¸ù¾ÝËùÑÔ),ÿ¸öÏß³ÌÒ»¸öʱ¼äƬ,ʱ¼äƬµ½ÁË,¾Í »á·¢ > > ÉúÏ̵߳÷¶È.ËùÒÔÓ¦¸Ã²»»á³öÏÖÄã˵µÄÎÊÌâ. > > ËûµÄÎÊÌâÊÇÔÚCµ÷ÓÃÖб»×è¶Ï£¬¿ØÖÆȨÎÞ·¨»Øµ½python½âÊÍÆ÷£¬¾ÍÎÞ·¨½øÐÐÏ̵߳÷¶È£¬ Òò´ËÁíÒ»¸öpythonÏ߳̾ÍʼÖÕ²»Äܱ»Ö´ÐС£pythonÏß³ÌÇл»ÊÇÖ»ÄÜÔÚbytecode¼¶±ðµÄ£¬ ²»Ïñ²Ù×÷ϵͳÏß³ÌÊÇÔÚmachine > code¼¶±ð¡£ > > > ÖÁÓÚ¿É°þ¶á,Òâ˼Êǵ±ÓÐÏß³ÌÓÅÏȼ¶¸ßÓÚÕýÔÚÔËÐеÄÏ̵߳ÄÓÅÏȼ¶Ê±,Ò²»á·¢ÉúÏß³Ì µ÷¶È, > > ¸Õ²ÅµÄemail˵´íÁË,¸üÕýÒ»ÏÂ. > > pythonÏß³ÌûÓÐÓÅÏȼ¶¸ÅÄÕâÒ²ÊÇpython¶Ô¶àÏß³ÌÖ§³Ö²»¹»ÍêÃÀµÄµØ·½Ö®Ò»¡£ > > -- > Qiangning Hong > Get Firefox! <http://www.spreadfirefox.com/? q=affiliates&id=67907&t=1> ------- End of Original Message -------
Zeuux © 2025
京ICP备05028076号