globalnum = 0 n = 1 class T( threading.Thread ): def run( self ): global globalnum globalnum += n for _ in xrange( 0, 999 ): t = T() t.start() print glo
+= is not threadsafe (source).
+=