emacs-devel
[Top][All Lists]
Advanced

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

Re: multi-threaded Emacs


From: Tom Tromey
Subject: Re: multi-threaded Emacs
Date: Sat, 29 Nov 2008 15:06:09 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:

Stefan> - handling thread-specific data: gcprolist, mark_byte_stack, and things
Stefan>   like that.  You've tackled this one.  I don't find your solution very
Stefan>   elegant, but I can't think of a much better one, unless pthreads does
Stefan>   provide some kind of thread-specific variables.

pthreads provides the clunky pthread_getspecific / pthread_setspecific
API.

However, it is worth noting that recent versions of GCC support a
__thread storage class, which provides efficient support for
thread-local variables.  IMO, for anything that is performance
sensitive, it is worth structuring the code so that this can be used.
See (info "(gcc)Thread-Local")

Tom




reply via email to

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