Re: [Qemu-devel] [PATCH v2 4/4] iothread: delay the context release to finalize

2017-09-25 Thread Stefan Hajnoczi
On Mon, Sep 25, 2017 at 02:37:29PM +0800, Peter Xu wrote: > When gcontext is used with iothread, the context will be destroyed > during iothread_stop(). That's not good since sometimes we would like > to keep the resources until iothread is destroyed, but we may want to > stop the thread before th

[Qemu-devel] [PATCH v2 4/4] iothread: delay the context release to finalize

2017-09-24 Thread Peter Xu
When gcontext is used with iothread, the context will be destroyed during iothread_stop(). That's not good since sometimes we would like to keep the resources until iothread is destroyed, but we may want to stop the thread before that point. Delay the destruction of gcontext to iothread finalize.