multithreading killing thread after timeout - python 2.7
<p>I'm running an async program, and every thread I start, I would like it</p>

<p>to have a timeout, that if it didn't complete the function it will just stop and kill itself(or some other thread will kill it)</p>

<pre><code>func(my_item, num1, num2, num3, timeout):
    calc = num1+num2
    # something that takes long time(on my_item)

for item in my_list:
        if item.bool:
            new_thread = threading.Thread(target=func, (item, 1, 2, 3, item.timeout))
            new_thread.start()
</code></pre>

<p>Now I want the main thread to keep on starting new threads, but I also want every thread to have a timeout to it, so that thread won't go on forever.</p>

<p>I'm using windows not UNIX, so I can't run SINGLRM</p>

<p>Thank You!</p>