@@ -0,0 +1,458 @@
+import multiprocessing%0Aimport pprint%0Afrom ppm import Trie%0A%0Atrie = None%0A%0Adef test(a):%0A    x, trie = a%0A    trie.add('b')%0A    trie.add('b')%0A    print(x, trie.bit_encoding)%0A    return trie.bit_encoding%0A%0Aif __name__ == '__main__':%0A    trie = Trie(5)%0A    trie.add('a')%0A    alist = %5B (x, trie) for x in range(0, multiprocessing.cpu_count()) %5D%0A    pool = multiprocessing.Pool(multiprocessing.cpu_count())%0A    result = pool.map(test, alist)%0A    pprint.pprint(result)%0A

Add a race condition tester