1. 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.
      3744fda5
  2. 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.
      188a9d99
  3. 01 Jan, 2018 1 commit
  4. 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.
      bc511a64
  5. 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
      thread-last-error.
      
      * test/src/thread-tests.el (thread-errors, thread-signal-early)
      (threads-condvar-wait): Test the values returned by
      thread-last-error.
      57153260
  6. 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.
      d018843e
    • 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.
      26b5426d
    • 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.
      9c4d2afa
    • 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.
      03e4ab0d
  7. 01 Jan, 2017 1 commit
  8. 22 Dec, 2016 1 commit
  9. 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.
      825f4dd4
    • 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.
      a416e1d6
  10. 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.
      (Bug#25171)
      * src/w32select.c: Don't include keyboard.h.
      
      * test/src/thread-tests.el (thread-errors): New test.
      99708163
  11. 10 Dec, 2016 1 commit
  12. 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/src/data-tests.el.
      * test/automated/threads.el: Moved to test/src/thread-tests.el.
      8ad92413
  13. 04 Jul, 2013 1 commit
  14. 27 Aug, 2012 2 commits
  15. 19 Aug, 2012 2 commits
  16. 15 Aug, 2012 2 commits