This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JA
Recipients JA
Date 2016-07-13.17:20:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1468430448.11.0.0781111425971.issue27508@psf.upfronthosting.co.za>
In-reply-to
Content
On Ubuntu 16.04 
python '3.5.1+ (default, Mar 30 2016, 22:46:26) \n[GCC 5.3.1 20160330]'

The following code prints "hi" 4 times: 
import multiprocessing
import time
import threading    

class dumb(threading.Thread):
    def __init__(self):
        super(dumb, self).__init__()
    def run(self):
        while True:
            print("hi")
            time.sleep(1)    

def test():
    for i in range(2):
        bar = dumb()
        bar.start()
def main():
    p = []
    for i in range(2):
        p.append(multiprocessing.Process(target=test))
    for i in p:
        i.start()
    for i in p:
        i.join()
if __name__ == '__main__':
    main()

Note: The above code runs fine on Python 3.5.2 (64-bit) on Windows 10

Joining the threads in test fixes the problem: 
def test():
    p = []
    for i in range(2):
        bar = dumb()
        bar.start()
        p.append(bar)
    for i in p:
        i.join()
History
Date User Action Args
2016-07-13 17:20:48JAsetrecipients: + JA
2016-07-13 17:20:48JAsetmessageid: <1468430448.11.0.0781111425971.issue27508@psf.upfronthosting.co.za>
2016-07-13 17:20:48JAlinkissue27508 messages
2016-07-13 17:20:48JAcreate