[Top][All Lists]

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

Re: "concurrency" branch updated

From: John Wiegley
Subject: Re: "concurrency" branch updated
Date: Thu, 05 Nov 2015 08:17:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

>>>>> Ken Raeburn <address@hidden> writes:

>> It seems to me that in Emacs there is no need to be able to switch threads
>> except when a thread is waiting. That should make things much simpler.

> I think preemptive thread switching (or real concurrent execution) is a
> better place to wind up, but cooperative thread switching is a good start.

I haven't had a chance to read this entire thread yet, but I wanted to chime
in and agree with both Richard and Ken. I have relatively few fears about
cooperative thread switching. Also, it gives us a chance to see how people
deal with debugging the sorts of issues it can lead to (e.g., a backtrace from
code unrelated to something you think you just did).

Upgrading to preemptive switching could happen later, once we've had more
experience with writing cooperative code. I hope at that point it would be a
fairly seamless upgrade, and we'd have mature facilities in place to
accommodate it (i.e., the ability to "stack" backtraces, to inspect the
environment of inactive threads, a messaging facility between threads to avoid
global mutation, etc).

What I want most is to make deadlocks and race conditions naturally hard to
write -- if not impossible. The rise of Heisenbugs could make our job as
maintainers much more difficult. All the worst bugs in my programming career
were related to preemptive threading in some way.


reply via email to

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