1. 30 Oct, 2018 1 commit
    • Philip Withnall's avatar
      gtask: Add a g_task_set_name() method · e89128a9
      Philip Withnall authored
      Similarly to g_source_set_name(), this sets a name on a GTask for
      debugging and profiling. Importantly, this name is propagated to the
      GSource for idle callbacks for the GTask, ending the glorious reign of
      `[gio] complete_in_idle_cb`.
      The name can be queried using g_task_get_name(). Locking is avoided by
      only allowing the name to be set before the GTask is used from another
      Includes tests.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
  2. 02 Oct, 2018 1 commit
    • Philip Withnall's avatar
      gtask: Compress GTask struct using a bitfield · 290bb0dd
      Philip Withnall authored
      There are a lot of gbooleans in the private GTask struct, which seems a
      bit wasteful. Use a bitfield to compress the struct a bit.
      This reduces the size of the struct from 216 bytes to 168 bytes on my
      64-bit machine.
      One of the fields needs to remain separate, since it’s used from a
      TRACE() macro which calls typeof() on it.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
  3. 01 Oct, 2018 1 commit
  4. 08 Aug, 2018 1 commit
  5. 26 Jun, 2018 1 commit
    • Philip Withnall's avatar
      gmain: Add names to various GSources constructed in GLib · 208a6e81
      Philip Withnall authored
      For the purposes of debugging, it is quite useful for every GSource to
      have a name set. Ensure that any GSource we construct inside GLib has a
      name set. For GSources which are then returned to the caller, this name
      can then be overridden with something even more useful by the caller.
      Since this data is only used for debugging, avoid doing any allocations
      for it; just use static strings.
  6. 07 Nov, 2017 1 commit
  7. 26 Oct, 2017 1 commit
  8. 11 Oct, 2017 1 commit
  9. 29 May, 2017 1 commit
  10. 22 Nov, 2016 2 commits
  11. 15 Jun, 2016 1 commit
  12. 04 May, 2016 1 commit
  13. 30 Apr, 2016 1 commit
  14. 16 Nov, 2015 1 commit
  15. 02 Nov, 2015 1 commit
  16. 24 Oct, 2015 1 commit
  17. 29 Jun, 2015 2 commits
  18. 04 Apr, 2015 1 commit
    • Dan Winship's avatar
      gtask: remove hardcoded GTask thread-pool size · 86866a2a
      Dan Winship authored
      GTask used a 10-thread thread pool for g_task_run_in_thread() /
      g_task_run_in_thread_sync(), but this ran into problems when task
      threads blocked waiting for another g_task_run_in_thread_sync()
      operation to complete. Previously there was a workaround for this, by
      bumping up the thread limit when that case was detected, but deadlocks
      could still happen if there were non-GTask threads involved. (Eg, task
      A sends a message to thread X and waits for a response, but thread X
      needs to complete task B in a thread before returning the response to
      task A.)
      So, allow GTask's thread pool to be expanded dynamically, by watching
      it from the glib worker thread, and growing it (at an
      exponentially-decreasing rate) if too much time passes without any
      tasks completing. This should solve the deadlocking problems without
      causing sudden breakage in apps that assume they can queue huge
      numbers of tasks at once without consequences.
  19. 10 Mar, 2015 1 commit
    • Philip Withnall's avatar
      gtask: Add a GTask:completed property · 4f1f68e6
      Philip Withnall authored
      This can be used to query whether the task has completed, in the sense
      that it has had a result set on it, and has already – or will soon –
      invoke its callback function.
      Notifications for this property are emitted immediately after the task’s
      main callback, in the same main context as that callback. This allows
      for multiple bits of code to listen for completion of the GTask, which
      opens the door for blocking on cancellation of the GTask and improved
      handling of ‘pending’ behaviour.
  20. 23 Sep, 2014 3 commits
  21. 09 Jul, 2014 1 commit
  22. 27 Mar, 2014 1 commit
  23. 20 Feb, 2014 1 commit
  24. 15 Feb, 2014 1 commit
    • Matthias Clasen's avatar
      docs: let go of &ast; · bc6ee788
      Matthias Clasen authored
      Since we are no longer using sgml mode, using /&ast; &ast;/ to
      escape block comments inside examples does not work anymore.
      Switch to using line comments with //
  25. 13 Feb, 2014 1 commit
  26. 08 Feb, 2014 1 commit
  27. 06 Feb, 2014 1 commit
  28. 01 Feb, 2014 5 commits
  29. 31 Jan, 2014 1 commit
  30. 08 Jan, 2014 1 commit
  31. 05 Dec, 2013 1 commit
  32. 17 Oct, 2013 1 commit