If in the event loop we detect that:
We should be able to spawn new worker threads that are then able to go into the worker_thread_func.
Additionally:
We should have the current thread exit.
As an alternate suggest, because this is extra complexity, we ditch this notion: We just have threads, and we do not grow or reduce the pool. IE we have tp->max_threads, we spawn them at start up, and that's it.
I've decided to remove this. It's complex and adds more potential issues in the code base. Lets just start all the threads at the start, and let them idle. It doesn't matter if they are asleep and ready to rock.
So I will prune out this code.
attachment 0002-Ticket-55-Remove-the-thread-pool-scaleup-down-skelet.patch
Depends on #62
Question, I see that you are setting max_threads in the nunc-stans code, but we also set it in DS using nnslapd-threadnumber. Just confirming that when DS sets this value it overrides the default in nunc-stans(16).
Yes, the value I'm setting there is an example in the docs, not the nunc-stans code. The ds value still takes precedence.
commit d812dc47aff3745b068fadb561dbee31e4a0c0ab Compressing objects: 100% (33/33), done. Writing objects: 100% (33/33), 9.68 KiB | 0 bytes/s, done. Total 33 (delta 25), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/nunc-stans.git 9dacc22..59aa673 master -> master