Commit Graph

14 Commits

Author SHA1 Message Date
John Cupitt e2c2866fc6 tweak docs, add changelog notes
and an assert for semaphore_down_timeout

see https://github.com/libvips/libvips/pull/3253
2023-01-03 12:09:24 +00:00
Kleis Auke Wolthuizen 848a119faa
threadset: stop idle threads after a regular timeout (#3253)
* Add `vips_semaphore_down_timeout` to public API

In preparation for the next commit.

* threadset: stop idle threads after a regular timeout

In line with the previous behaviour of GLib's threadpool.

* threadset: fix a small memory leak

* threadset: ensure idle threads are freed on exit

GLib threads are spawned with `ref_count == 2`, this reference is
decreased during thread exit and associated resources are freed
during `g_thread_join()`. However, idle threads that are stopped
after a regular timeout are not joined. To fix this, decrease the
reference count during `vips_threadset_add()` and increase it just
before joining the thread with `g_thread_join()`.

See:
2d5d990c6a/glib/gthread.c (L522)
2d5d990c6a/glib/gthread-posix.c (L1287)

* Deprecate `vips_g_thread_join()` in favor of `g_thread_join()`

* nit: remove extra semicolon
2023-01-03 12:00:35 +00:00
Kleis Auke Wolthuizen 0337c09700
Cleanup gettext handling (#2695)
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
John Cupitt eb3ad6d64f add lots of instrumentation
also svg output
2013-11-26 14:57:56 +00:00
Benjamin Gilbert 8cc76a6ba3 Update address for Free Software Foundation
Also update LGPLv2.1 license text from the copy currently on the GNU
website.
2013-03-07 00:40:19 -05:00
John Cupitt 7e3494f6eb new new g_thread*() API 2012-10-23 13:36:39 +01:00
John Cupitt 013dd225f6 update g_cond_*() usage 2012-10-23 12:55:38 +01:00
John Cupitt fad78f8555 rework gthread usage
glib-2.32 deprecated g_mutex_new() ... use a compat function to hide
this change

also remove the --without-threads configure flag, gthread is now
compulsory, so there was no longer any point
2012-10-22 22:08:53 +01:00
John Cupitt f5f0dda551 experiment with thread stalling 2012-08-21 16:18:25 +01:00
John Cupitt ae8faf6597 remove dmalloc support
we never used it and valgrind etc. is better anyway
2011-09-23 17:12:47 +01:00
John Cupitt 8ddc805878 phew all done
iofuncs is now all on the vips_ namespace, and all revised, hopefully
2011-03-28 17:18:06 +01:00
John Cupitt c7b74f620f yet more cleanups
just util.c left now, woo
2011-03-28 14:57:43 +01:00
John Cupitt ab427d906b iofuncs compiles
except for a reset thing we need argh
2011-03-03 17:54:08 +00:00
John Cupitt 4e76695e19 merge gtkdoc branch 2009-08-16 15:00:08 +00:00