I think that it is not possible to have two threads that contain rate() statements, because only the main thread can process window events, and there's some kind of collision with wxPython, upon which VPython is based. Here however is a scheme that my do what you want, in that you can have multiple objects animated, and a separate process p can be running along in a separate thread.
from __future__ import division, print_function
import thread
import time
from visual import *
scene.range = 10
def create(w):
b = sphere(pos=(0,0,0), radius=0.5)
b.velocity = vector(w,0,0)
return b
balls = [create(1), create(-1)]
def p(a):
while True:
time.sleep(0.2*a)
if a == 1:
balls[0].color = color.cyan
balls[1].color = color.red
else:
balls[0].color = color.magenta
balls[1].color = color.yellow
try:
thread.start_new_thread( p, (1,) )
thread.start_new_thread( p, (2,) )
except:
print("Error: unable to start thread")
while True:
rate(100)
for ball in balls: