all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15990: Bug-report: `sleep-for' doesn't sleep for expected period, maybe after async process invocation.
@ 2013-11-28  6:52 Teika Kazura
  2014-06-25 22:44 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Teika Kazura @ 2013-11-28  6:52 UTC (permalink / raw)
  To: 15990

Hi, Emacs developers.

* Bug description
`sleep-for' ends too early, by not sleeping for the expected time. It's speculated that it's caused by a termination of an asynchronous process. [1]

This bug does not always reproduce, but it often does.

[1] http://stackoverflow.com/questions/14698081/elisp-sleep-for-doesnt-block-when-running-a-test-in-ert

* Environment
Gentoo Linux, Emacs-24.3 and 24.1.
Debian Linux, Emacs-23.2

MacOS X, too, according to a page. [1]

* Code to reproduce the bug
Do "emacs -q" and run the code below. It uses an external Unix command "sleep".
It has a line `(sleep-for 3)', but it *often* ends immediately. The last line judges the result so that you don't need a timer watch to confirm.

As far as I tested, the bug shows 100%, but if the bug doesn't reproduce, well, please try several times, or another environment.  ;-) (With the original code where I first met this problem, the bug occurrence rate exceeds 50%.)

------------------------------------------------------------------------
(let ((buf "*sleep-for test*")
      (now (cadr (current-time))))
  (start-process "test" buf "sleep" "0.1")
  (sleep-for 3)
  (message "This should be t: %s" (< now (- (cadr (current-time)) 3))))
------------------------------------------------------------------------

* Others
The following bug report may be related. Not sure.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6202

I think I can compile the bzr latest snapshot. (But it takes me 20 min. to compile 24.3. :P)

Thank you very much. Best regards,

Teika (Teika kazura)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15990: Bug-report: `sleep-for' doesn't sleep for expected period, maybe after async process invocation.
  2013-11-28  6:52 bug#15990: Bug-report: `sleep-for' doesn't sleep for expected period, maybe after async process invocation Teika Kazura
@ 2014-06-25 22:44 ` Glenn Morris
  2014-06-25 23:07   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2014-06-25 22:44 UTC (permalink / raw)
  To: 15990


For the record, see also http://debbugs.gnu.org/17647#25 .





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#15990: Bug-report: `sleep-for' doesn't sleep for expected period, maybe after async process invocation.
  2014-06-25 22:44 ` Glenn Morris
@ 2014-06-25 23:07   ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2014-06-25 23:07 UTC (permalink / raw)
  To: 15990

Glenn Morris wrote:

> For the record, see also http://debbugs.gnu.org/17647#25 .

And also

http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00294.html





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-25 23:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28  6:52 bug#15990: Bug-report: `sleep-for' doesn't sleep for expected period, maybe after async process invocation Teika Kazura
2014-06-25 22:44 ` Glenn Morris
2014-06-25 23:07   ` Glenn Morris

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.