Permalink
Browse files

Stupid test

  • Loading branch information...
1 parent 96b18cf commit 49d1344e24a82490a93b17127211075091994548 @ask committed Apr 23, 2012
Showing with 25 additions and 2 deletions.
  1. +0 −2 billiard/forking.py
  2. +25 −0 t.py
View
@@ -146,8 +146,6 @@ def dump(obj, file, protocol=None):
# Make (Pipe)Connection picklable
#
-from ._ext import Connection
-
def reduce_connection(conn):
# XXX check not necessary since only registered with ForkingPickler
View
25 t.py
@@ -0,0 +1,25 @@
+import billiard
+
+
+def f(x):
+ print("PROCESS %r" % (x, ))
+ return x ** x
+
+
+def cb(res):
+ print("GOT: %r" % (res, ))
+
+
+
+def main():
+ billiard.forking_enable(False)
+ x = billiard.Pool(2)
+ x.apply_async(f, (8, ), callback=cb)
+
+ x.close()
+ x.join()
+
+
+if __name__ == "__main__":
+ billiard.freeze_support()
+ main()

0 comments on commit 49d1344

Please sign in to comment.