Make threadpool_clear_queue resistant to concurrent runtime shutdown.
commit1ab5169f9ca0f399c3cd55b266fee33e0657bd8e
authorRodrigo Kumpera <kumpera@gmail.com>
Thu, 6 Jun 2013 22:42:40 +0000 (6 18:42 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 6 Jun 2013 23:00:06 +0000 (6 19:00 -0400)
tree0862d482521f47151edeec02b78bda45b21903b4
parent9b24f8c58b594da6a4c539556b21df89879ea8e6
Make threadpool_clear_queue resistant to concurrent runtime shutdown.

If threadpool_clear_queue is called while the runtime is been shutdown
it might crash since the queue will have been cleaned.

So now we guard against null queues and bail out from appending
the existing jobs if shutdown was initiated.
mono/metadata/threadpool.c