[Python-bugs-list] [Bug #122985] threading not ok with GNU pth

noreply@sourceforge.net noreply@sourceforge.net
Tue, 21 Nov 2000 03:25:31 -0800


Bug #122985, was updated on 2000-Nov-20 08:55
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Closed
Resolution: Duplicate
Bug Group: None
Priority: 5
Summary: threading not ok with GNU pth

Details: this program is buggy with GNU pth ...

------
#!/usr/bin/env python

from threading import *


def impr():
  d = 0
  while 1:
    d += 1
    print '|',
    if d % 12 == 0:
      e.set()
      f.clear()
      f.wait()


if __name__ == '__main__':
  T1 = Thread(None, impr, '1')
  e = Event()
  f = Event()
  T1.start()

  c = 0
  while 1:
    c += 1
    print '.',
    if c % 10 == 0 :
      f.set()
      e.clear()
      e.wait()

------

the program gives only :
. . . . . . . . . . | | | | | | | | | | | | . . . . . . . . . 

instead of a eternal serie of 10 dots followed by 12 pipes...

i use pth because i'm on hppa1.1-hp-hpux10.20 and there's no 
standard thread mecanism...


Follow-Ups:

Date: 2000-Nov-21 03:24
By: moshez

Comment:
Duplicate of 122985
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=122985&group_id=5470