thread-pool: fix race in thread reuse
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 15 Jul 2013 12:50:38 +0000 (14:50 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 15 Jul 2013 12:50:38 +0000 (14:50 +0200)
commit0ce4d4d5c7a433a60e9dc963179172e3ce9a620b
tree85f36d371777d012953a0c69adc049f962974861
parent3fe1096fd12c1ddfca5cfb7469f0d457aa17a8c2
thread-pool: fix race in thread reuse

If we try to reuse a thread right after we made it stop, we end up using a
stopped thread. Catch this case and only reuse threads that are not stopping.
gst/rtsp-server/rtsp-thread-pool.c
gst/rtsp-server/rtsp-thread-pool.h