On Wed, Mar 06, 2013 at 06:24:37PM +0100, Paolo Bonzini wrote: > Il 06/03/2013 16:45, Stefan Hajnoczi ha scritto: > > This patch adds a ThreadPool to AioContext. It's possible that some > > AioContext instances will never use the ThreadPool, so defer creation > > until aio_get_thread_pool(). > > What lock should protect against doing this twice?
aio_get_thread_pool() is not thread-safe and I don't think it needs to be. I imagine it will only be called from the thread that runs the AioContext. Stefan
