Problems with threads

Dominic Hillenbrand I-C-H at gmx.de
Wed Sep 1 13:17:21 EDT 1999


I have written a short program that goes like this:

s = Semaphore(MAX_THREADS)

while 1:
   listen on server port
   accept request
   s.aquire()
   start_new_thread(serve_client, (socket, ))

def serve_client(s):
   do something important
   global s
   s .release()

This code produces this type of error message:

currentThread(): no current thread for 1025 
currentThread(): no current thread for 2050 
(.....)

The program still seems to run correct!!!
But what is the reason for the error message?
Maybe the RLock which is used for
Conditions?


Thank you very much for your replies!

	Dominic 


P.S. Will there be Python support for the linuxthreads semaphores ?








More information about the Python-list mailing list