Is it safe to call RPy functions in a multiprocessing environment and are there any multiprocessing issues regarding RPy that one should be aware of?
A simple example might be the following:
from multiprocessing import Pool
from rpy import *
def f(x):
return r.mean(x)
if __name__ == '__main__':
p = Pool(5)
print sum(p.map(f, [range(1, 1000000), range(2, 2000000), range(3, 3000000)]))