Bug fix. Modify parameter of extract.

Close #6.
Guard extract_impl method with Mutex#synchronize.

In very rare case, extract_impl causes segmentation fault.
This issue is under investigation.
Version 1.2.1