Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from multiprocessing import Process, Queue

class Aplicativo(object):

    Comando = 0

    def MostraValor(self):
        print("VALOR CMD = ", self.Comando)

    def InsereValores(self, Cmd):
        self.Comando = Cmd

    def EventoBotao(self):
        self.InsereValores(100)

App = Aplicativo()
App.EventoBotao()

def Funcao1():
    App.MostraValor()

def Funcao2():
    App.MostraValor()

p1 = Process(target=Funcao1).start()
p2 = Process(target=Funcao2).start()