1. 18 Nov, 2016 3 commits
    • clar: Introduce assertion helpers for threads · bbf22f82
      Don't `cl_git_pass` in a child thread.  When the assertion fails, clar
      will `longjmp` to its error handler, but:
      
      > The effect of a call to longjmp() where initialization of the jmp_buf
      > structure was not performed in the calling thread is undefined.
      
      Instead, set up an error context that threads can populate, and the
      caller can check.
      Edward Thomson committed
    • core::init tests: reverse init/shutdown · 99479062
      We want a predictable number of initializations in our multithreaded
      init test, but we also want to make sure that we have _actually_
      initialized `git_libgit2_init` before calling `git_thread_create` (since
      it now has a sanity check that `git_libgit2_init` has been called).
      
      Since `git_thread_create` is internal-only, keep this sanity check.
      Flip the invocation so that we `git_libgit2_init` before our thread
      tests and `git_libgit2_shutdown` again after.
      Edward Thomson committed
    • threads: introduce `git_thread_exit` · 82f15896
      Introduce `git_thread_exit`, which will allow threads to terminate at an
      arbitrary time, returning a `void *`.  On Windows, this means that we
      need to store the current `git_thread` in TLS, so that we can set its
      `return` value when terminating.
      
      We cannot simply use `ExitThread`, since Win32 returns `DWORD`s from
      threads; we return `void *`.
      Edward Thomson committed
  2. 15 Nov, 2016 9 commits
  3. 14 Nov, 2016 28 commits