gcc 4.7.2
Apache Portable Runtime
Hello,
I am getting started with apr using threads. My program will be using a lot of threads and I want to use a thread pool so that I can better control them.
However, the apr doesn’t really have much documentation about creating thread pools. I have looked at the following api’s
/* Create the threading pool */
apr_thread_pool_create
/* Would I still need to do this, as the below api will create new thread? */
apr_thread_create
/* Or would this be better */
apr_procattr_create
/* When all finished */
apr_thread_pool_destroy
Documentation seems to be very limited with APR.
Many thanks for any suggestions,
I believe APR thread pool existed at an older time when these APIs weren’t prevalent in the regular Java runtimes. These days, you should take a look at java.util.concurrent…
I’m linking you to something that tells you how to use it.
Edit: Sorry, I needed to go to a third party hosted Java tutorial for this.
http://www.math.uni-hamburg.de/doc/java/tutorial/essential/threads/group.html