qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ui/cocoa: Set UI information


From: Akihiko Odaki
Subject: Re: [PATCH] ui/cocoa: Set UI information
Date: Wed, 9 Feb 2022 20:32:07 +0900

On Wed, Feb 9, 2022 at 3:07 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sat, 5 Feb 2022 at 02:06, Akihiko Odaki <akihiko.odaki@gmail.com> wrote:
> >
> > On Sat, Feb 5, 2022 at 1:19 AM Peter Maydell <peter.maydell@linaro.org> 
> > wrote
>
> > > (1) A question for Akihiko:
> > > Are all the cocoa calls we make in updateUIInfo safe to
> > > make from a non-UI thread? Would it be preferable for this
> > > call in cocoa_switch() to be moved inside the dispatch_async block?
> > > (Moving it would mean that I wouldn't have to think about whether
> > > any of the code in it needs to have an autorelease pool :-))
> >
> > It is not safe. Apparently I totally forgot about threads when I wrote this.
> >
> > It should be moved in the dispatch_async block as you suggest. Should
> > I write a patch, or will you write one before you delete autorelease
> > pools?
>
> I'll write a patchset. If you have time to test it when I send it out
> that would be great.

Thanks, I will test the patchset soon after I receive it.

>
> Incidentally, I think the answer to my other question
> > > Is it safe to call dpy_set_ui_info() from a non-QEMU-main-thread?
>
> is "no, and so the body of updateUIInfo should be enclosed in a
> with_iothread_lock block".
>
> -- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]