qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu Developers <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] ui/cocoa: Set UI information
Date: Wed, 9 Feb 2022 20:32:07 +0900	[thread overview]
Message-ID: <CAMVc7JWiuvn99mQTC81yGONGLUby-37aYbtqw2dg7YOjVmC48w@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-_t+TVnqzgBk1ZM7xuq-ixAPxNNP3i-Z19HgmXs4EB=w@mail.gmail.com>

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	other threads:[~2022-02-09 11:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 14:19 [PATCH] ui/cocoa: Set UI information Akihiko Odaki
2021-06-23 12:43 ` Gerd Hoffmann
2022-02-04 16:19 ` Peter Maydell
2022-02-05  2:06   ` Akihiko Odaki
2022-02-08 18:07     ` Peter Maydell
2022-02-09 11:32       ` Akihiko Odaki [this message]
2022-02-14 10:27   ` Gerd Hoffmann
2022-02-14 10:43     ` Peter Maydell
2022-02-14 11:51       ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMVc7JWiuvn99mQTC81yGONGLUby-37aYbtqw2dg7YOjVmC48w@mail.gmail.com \
    --to=akihiko.odaki@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).