add test for multi threading.

It seems to need to pass a parent context between threads.
fix a test
Merge pull request #45 from katsuyoshi/thread

add test for multi threading.