passing threading.Thread() and function object
Cliff Wells
clifford.wells at comcast.net
Wed Oct 13 14:26:55 EDT 2004
More information about the Python-list mailing list
Wed Oct 13 14:26:55 EDT 2004
- Previous message (by thread): passing threading.Thread() and function object
- Next message (by thread): failed delivery messages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 2004-10-13 at 13:17 -0500, Christopher J. Bottaro wrote: > Hello, > > I'm new to Python programming, so please excuse me. > > thread = threading.Thread(self.somefunc()) thread = threading.Thread(target = self.somefunc) > thread.start() > print "Thread started" > > def somefunc(self): > while (1) > print "In thread" You are *calling* self.somefunc in your instantiation. You need to pass a reference to the method instead. Regards, Cliff -- Cliff Wells <clifford.wells at comcast.net>
- Previous message (by thread): passing threading.Thread() and function object
- Next message (by thread): failed delivery messages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list