[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concurrency via isolated process/thread
From: |
Po Lu |
Subject: |
Re: Concurrency via isolated process/thread |
Date: |
Fri, 07 Jul 2023 21:31:16 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ihor Radchenko <yantar92@posteo.net> writes:
> Po Lu <luangruo@yahoo.com> writes:
>
>> Ihor Radchenko <yantar92@posteo.net> writes:
>>
>>> Same with variables - even if some global variable needs to be locked,
>>> it is unlikely that it will need to be accessed by another thread.
>>
>> I doubt symbol value cells will need to be individually interlocked.
>> Emacs Lisp code will need to insert the appropriate instructions to
>> prevent the CPU from undertaking optimizations on load and store
>> operations on those cells when necessary. ...
>
> I had a different simple scenario in mind:
>
> (let ((oldval case-fold-search))
> (unwind-protect
> (progn (setq case-fold-search nil)
> ;; We surely do not want the value of `case-fold-search' to be
> ;; changed in the middle of `expensive-computation'.
> (expensive-computation))
> (setq case-fold-search oldval))
That's easy: case-fold-search can be made local to each thread.
- Re: Concurrency via isolated process/thread, (continued)
- Re: Concurrency via isolated process/thread, Dmitry Gutov, 2023/07/10
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/09
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/09
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/09
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/08
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/08
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread,
Po Lu <=
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/07
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/05
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Po Lu, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06
- Re: Concurrency via isolated process/thread, Ihor Radchenko, 2023/07/06
- Re: Concurrency via isolated process/thread, Eli Zaretskii, 2023/07/06