-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_com
42 lines (36 loc) · 829 Bytes
/
test_com
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'''
@author Juan Carlos Aguilera
'''
import os
import sys
import threading
import time
import math
import socket
class RoboBoatServerThread (threading.Thread):
def __init__(self, threadID, name):
threading.Thread.__init__(self);
self.threadID = threadID;
self.name = name;
def run(self):
print("End RoboBoatServerThread");
class XBeeThread (threading.Thread):
def __init__(self, threadID, name):
threading.Thread.__init__(self);
self.threadID = threadID;
self.name = name;
def run(self):
print("End RoboBoatServerXBeeThread");
'''
' Inicio del programa
'''
init();
# Create new threads
thread1 = RoboBoatServerThread(1, "RoboBoatServerThread");
thread2 = XBeeThread(2, "XBeeThread");
# Start new Threads
thread1.start();
thread2.start();
thread1.join();
thread2.join();
print ("Exiting Main Thread");