1. 31 Aug, 2018 1 commit
    • Michael Albinus's avatar
      Rename thread-alive-p to thread-live-p · ac7936cb
      Michael Albinus authored
      * doc/lispref/threads.texi (Basic Thread Functions): Use thread-live-p.
      * etc/NEWS: 'thread-alive-p' has been renamed to 'thread-live-p'.
      * src/thread.c (thread_live_p): Rename from thread_alive_p.  Adapt
      all callees.
      (Fthread_live_p): Rename from Fthread_alive_p.
      (syms_of_threads): Make thread-alive-p an alias of thread-live-p.
      * test/src/thread-tests.el (all): Replace `thread-alive-p' by
      (threads-live): Rename from `threads-alive'.
  2. 13 Jul, 2018 1 commit
  3. 12 Jul, 2018 1 commit
    • Michael Albinus's avatar
      Provide feature 'threads · 3744fda5
      Michael Albinus authored
      * src/thread.c (syms_of_threads): Provide feature "threads".
      * test/src/thread-tests.el (top): Declare the functions.
      (all): Use (featurep 'threads) check.
  4. 17 Jan, 2018 1 commit
    • Glenn Morris's avatar
      Add some test skip conditions · 188a9d99
      Glenn Morris authored
      * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726)
      (vc-bzr-test-bug9781): Skip if bzr is faulty.
      * test/src/thread-tests.el: Skip if not compiled with threads.
  5. 01 Jan, 2018 1 commit
  6. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
  7. 18 Jan, 2017 1 commit
    • Eli Zaretskii's avatar
      Rudimentary error handling for non-main threads · 57153260
      Eli Zaretskii authored
      * src/thread.c (last_thread_error): New static variable.
      (syms_of_threads): Staticpro it.
      (record_thread_error, Fthread_last_error): New functions.
      (syms_of_threads): Defsubr Fthread_last_error.
      * doc/lispref/threads.texi (Basic Thread Functions): Document
      * test/src/thread-tests.el (thread-errors, thread-signal-early)
      (threads-condvar-wait): Test the values returned by
  8. 13 Jan, 2017 4 commits
    • Eli Zaretskii's avatar
      Fix last change · d018843e
      Eli Zaretskii authored
      * test/src/thread-tests.el (threads-condvar-wait): Revert
      previous change.  Make sure no other threads from previous
      tests are running, to avoid interfering with our thread counts.
    • Eli Zaretskii's avatar
      Fix the new condvar test · 26b5426d
      Eli Zaretskii authored
      * test/src/thread-tests.el (threads-condvar-wait): Enlarge the
      time we sleep in the main thread to let the other thread
      process notifications.
    • Eli Zaretskii's avatar
      Minor improvements in the new condvar test · 9c4d2afa
      Eli Zaretskii authored
      * test/src/thread-tests.el (threads-test-condvar-wait): Use
      with-mutex instead of emulating it inline.
      (threads-condvar-wait): Improve comments.  Check that the new
      thread is alive before waiting for it to become blocked on the
      conditional variable.
    • Eli Zaretskii's avatar
      Fix a bug in waiting for condition variable · 03e4ab0d
      Eli Zaretskii authored
      * src/thread.c (lisp_mutex_lock, lisp_mutex_unlock)
      (lisp_mutex_unlock_for_wait, condition_wait_callback)
      (condition_notify_callback): Improve commentary.
      (condition_wait_callback): Call post_acquire_global_lock before
      attempting to lock the mutex, to make sure the lock's owner is
      recorded correctly.
      * test/src/thread-tests.el (threads-condvar-wait): New test.
  9. 01 Jan, 2017 1 commit
  10. 22 Dec, 2016 1 commit
  11. 12 Dec, 2016 2 commits
    • Eli Zaretskii's avatar
      Avoid crashing if a new thread is signaled right away · 825f4dd4
      Eli Zaretskii authored
      * src/thread.c (post_acquire_global_lock): Don't raise the pending
      signal if the thread's handlers were not yet set up, as that will
      cause Emacs to exit with a fatal error.  This can happen if a
      thread is signaled as soon as make-thread returns, before the new
      thread had an opportunity to acquire the global lock, set up the
      handlers, and call the thread function.
      * test/src/thread-tests.el (thread-signal-early): New test.
    • Eli Zaretskii's avatar
      Fix point motion in cloned buffers · a416e1d6
      Eli Zaretskii authored
      * src/thread.c (post_acquire_global_lock): Call
      set_buffer_internal_2 instead of tricking set_buffer_internal_1
      into resetting the current buffer even if it didn't change.  This
      avoids bug#25165, caused by failing to record the modified values
      of point and mark, because current_buffer was set to NULL.  Also,
      don't bother re-setting the buffer if there was no thread switch,
      as that just wastes cycles.
      * src/buffer.c (set_buffer_internal_2): New function, with most of
      the body of set_buffer_internal_1, but without the test for B
      being identical to the current buffer.
      (set_buffer_internal_1): Call set_buffer_internal_2 if B is not
      identical to the current buffer.
      * src/buffer.h (set_buffer_internal_2): Add prototype.
      * test/src/thread-tests.el (thread-sticky-point): New test.
  12. 11 Dec, 2016 1 commit
    • Eli Zaretskii's avatar
      Avoid aborts when a thread signals an error · 99708163
      Eli Zaretskii authored
      * src/thread.h (struct thread_state): Add members
      m_waiting_for_input and m_input_available_clear_time.
      (waiting_for_input, input_available_clear_time): New macros.
      * src/keyboard.c (waiting_for_input, input_available_clear_time):
      Remove; they are now macros that reference the current thread.
      * src/w32select.c: Don't include keyboard.h.
      * test/src/thread-tests.el (thread-errors): New test.
  13. 10 Dec, 2016 1 commit
  14. 06 Dec, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix the test suite · 8ad92413
      Eli Zaretskii authored
      * test/automated/bindings.el: Contents moved to
      * test/automated/threads.el: Moved to test/src/thread-tests.el.
  15. 04 Jul, 2013 1 commit
  16. 27 Aug, 2012 2 commits
  17. 19 Aug, 2012 2 commits
  18. 15 Aug, 2012 2 commits