[C++] We use ThreadPool to read hdfsfile, when the std::thread finished, it call the deadlock!
Open
Component: C++
Type: bug
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
we use ThreadPool to read hdfsfile, when the std::thread finishes task,it is destroyed and the hdfsThreadDestructor could be called.

In the hdfsThreadDestructor , it will call (*env)->GetJavaVM(env, &vm) and it couldn't get the vm which is condition wait, so the program is not finished.

arrow version: apache-arrow-11.0.0
hadoop version: branch-3.2.0
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.