[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User interaction from multiple threads
From: |
Michael Albinus |
Subject: |
Re: User interaction from multiple threads |
Date: |
Sat, 25 Aug 2018 13:58:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Elias Mårtenson <address@hidden> writes:
Hi Elias,
> May I propose that the murex be hidden behind a function and a macro?
> The purpose of this would be to allow for the function to adviced by
> libraries that want to do something special. Something like this:
>
> (defmacro with-prompt-interaction (&body body)
> (call-with-prompt-interaction `(lambda () ,@body)))
>
> (defun call-with-prompt-interaction (fn)
> (with-mutex (interaction-mutex)
> (funcall fn)))
>
> This would allow advices to be applied to the
> call-with-prompt-interaction function.
But then you must force everybody to use the
`call-with-prompt-interaction' function. Doesn't it suffice to advice
`mutex-lock' and `mutex-unlock'? In your advice code you could check,
whether MUTEX is equal to `interaction-mutex'.
> Regards,
> Elias
Best regards, Michael.
- Re: User interaction from multiple threads, (continued)
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/24
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/23
- Re: User interaction from multiple threads, Elias Mårtenson, 2018/08/23
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/24
- Re: User interaction from multiple threads, Michael Albinus, 2018/08/24
- Re: User interaction from multiple threads, Elias Mårtenson, 2018/08/24
- Re: User interaction from multiple threads,
Michael Albinus <=
- Re: User interaction from multiple threads, Elias Mårtenson, 2018/08/27
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/24
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/25
- Re: User interaction from multiple threads, Phil Sainty, 2018/08/25
- Re: User interaction from multiple threads, Richard Stallman, 2018/08/25
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/25
- Re: User interaction from multiple threads, hw, 2018/08/26
- Re: User interaction from multiple threads, Eli Zaretskii, 2018/08/26
- Re: User interaction from multiple threads, hw, 2018/08/27
- Re: User interaction from multiple threads, Michael Albinus, 2018/08/27