Distributed graph among different threads