Skip to content

Commit

Permalink
Stupid test
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Apr 23, 2012
1 parent 96b18cf commit 49d1344
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 0 additions & 2 deletions billiard/forking.py
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions 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.