Remove alloc and destroy callbacks from the taskprocessor.
authorMark Michelson <mmichelson@digium.com>
Tue, 15 Jan 2013 18:40:36 +0000 (18:40 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 15 Jan 2013 18:40:36 +0000 (18:40 +0000)
commit65c7d6e2c3d4fc3a161a31ff1e89d20256926fb1
tree8076acfcfd024cdfa45aea20a5fa908e6af34651
parentc80f86f007f6676f105a768be0ceedb3a8ec8298
Remove alloc and destroy callbacks from the taskprocessor.

Now user data is allocated by the creator of the taskprocessor
listener and that user data is passed into ast_taskprocessor_listener_alloc().
Similarly, freeing of the user data is left up to the user himself. He can
free the data when the taskprocessor shuts down, or he can choose to hold
onto it if it makes sense to do so.

This, unsurprisingly, makes threadpool allocation a LOT cleaner now.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@379120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/taskprocessor.h
main/taskprocessor.c
main/threadpool.c
tests/test_taskprocessor.c