I'm trying to make a simple communication between processes, but the child f_filho
is not receiving the message sent by the parent.
How to solve?
# -*- coding: cp1252 -*-
from multiprocessing import Process,Pipe
import numpy as np
def f_filho(pipe):
frase=pipe.recv()
print frase
if __name__ == '__main__':
pipe_pai,pipe_filho=Pipe()
print('começando o programa')
p=Process(target=f_filho , args=(pipe_filho,))
p.start()
pipe_pai.send(['ola meu filho']) #inica comunicação pelo pipe para o filho
pipe_pai.close()
p.join()
print('fiiim')