atcurtis/jtbb ? reverse-engineered prompt
Reverse engineered prompt
Build me a Java library that acts like a lightweight port of Intel Thread Building Blocks.
I want it to help a Java app run work in parallel with a simple API for splitting tasks, running them on threads, and waiting for results. Keep it practical and easy to use, even if it is not a perfect one to one copy of the original C++ library. Focus on the core pieces that make parallel work easier, like task execution, thread management, and basic building blocks that developers can reuse.
Please make it compile and include a small example showing how someone would use it in a real program. If you need to check current Java docs or best practices for concurrency, go ahead and look them up online. Keep the code clean and understandable, since this is meant to be a usable starting point rather than a huge framework.
Are you gonna build this?
make sure you review the code using coderabbit