Dear Kent,
thanks your comment.
>> > When this program leaves from the
while loop, it doesn't terminate the
>> > comreader thread.
>>If you call self.setDaemon() here you will
mark the thread as a daemon
>>thread and it will not block the exit of the program.
It works well.
Yours sincerely,
János Juhász wrote:
>
> Dear Tutors,
>
> ###
> from threading import Thread
> import sys
> import time
>
> # This thread would read lines from a
> # barcode scanner
> class ComThread(Thread):
> def __init__(self):
> Thread.__init__(self)
If you call s
Dear Tutors,
###
from threading import Thread
import sys
import time
# This thread would read lines from a
# barcode scanner
class ComThread(Thread):
def __init__(self):
Thread.__init__(self)
def run(self):
while 1:
ti