No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi guys; I'm new in python and thread ,i start learning by create a simple code but i find some defficult this code below have some function and thread also Queue function to share data between thread this is a part of my code: def PutChar(Ch): #ask user to put … |
|
Re:
Hi Any one know how I can get the following function to return a value - thanks. [CODE]import threading import time def stringFunction(value): str = "This is string no. " + value return str thread1 = threading.Thread(stringFunction("one")) thread1.join() thread1.start() while threading.activeCount()>1: time.sleep(1) print thread1 [/CODE] Currently returns "<Thread(Thread, stopped)>" Not … |