all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Jason Rumney <jasonr@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
	adrian.b.robert@gmail.com, monnier@iro.umontreal.ca,
	emacs-devel@gnu.org
Subject: Re: Patch to trunk: merge common code in hourglass impl
Date: Wed, 04 Jun 2008 23:38:18 +0200	[thread overview]
Message-ID: <48470B4A.5040201@gmail.com> (raw)
In-Reply-To: <484709B0.9060804@gnu.org>

Jason Rumney wrote:
> Eli Zaretskii wrote:
>> Yes, atimers work by sending SIGALRM, which isn't supported on
>> Windows.  While Windows has equivalent functionality, no one stepped
>> forward to emulate atimers, probably because their use in Emacs is
>> quite limited, and in areas where Windows offers alternate ways of
>> doing the same.
>>   
> 
> What is the equivalent functionality? Threads are not the same as 
> signals, as they do not block other threads from executing. This is a 
> problem when any Lisp code is run, as a GC can occur in the main Lisp 
> thread while the signal emulation thread is running Lisp code, leading 
> to memory corruption and crashes. So any system timers need to be 
> handled in the Lisp thread, which effectively means they are 
> synchronous. Since the hourglass code doesn't actually need to run Lisp, 
> I used a Windows system timer running in the UI thread, which is not 
> generally busy enough to have delays like the Lisp thread, but I don't 
> think a general atimer implementation can be done that way.


Is it not possible to use critical sections (which is like a low cost in 
process semaphore)?




  reply	other threads:[~2008-06-04 21:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  0:05 Patch to trunk: merge common code in hourglass impl Adrian Robert
2008-06-04  5:53 ` Stefan Monnier
2008-06-04  9:31   ` Jason Rumney
2008-06-04 16:17     ` Stefan Monnier
2008-06-04 17:31     ` Eli Zaretskii
2008-06-04 21:31       ` Jason Rumney
2008-06-04 21:38         ` Lennart Borgman (gmail) [this message]
2008-06-06 20:00         ` Eli Zaretskii
2008-07-15  0:46         ` Adrian Robert
2008-07-15  1:41           ` Stefan Monnier

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=48470B4A.5040201@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=adrian.b.robert@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.