protect pcap jni code from multi-threads