1#-----------------------------------------------------------------------------
2# Copyright (c) 2005-2019, PyInstaller Development Team.
3#
4# Distributed under the terms of the GNU General Public License with exception
5# for distributing bootloader.
6#
7# The full license is in the file COPYING.txt, distributed with this software.
8#-----------------------------------------------------------------------------
9
10import multiprocessing
11import sys
12
13
14class SendeventProcess(multiprocessing.Process):
15    def __init__(self, resultQueue):
16        multiprocessing.Process.__init__(self)
17        self.resultQueue = resultQueue
18        self.start()
19
20    def run(self):
21        print('SendeventProcess begins')
22        self.resultQueue.put((1, 2))
23        print('SendeventProcess ends')
24
25
26if __name__ == '__main__':
27    multiprocessing.freeze_support()
28    print('main begins')
29    resultQueue = multiprocessing.Queue()
30    sp = SendeventProcess(resultQueue)
31    assert resultQueue.get() == (1, 2)
32    print('get ends')
33    sp.join()
34    print('main ends')
35