libvips/libvips/include/vips
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
..
almostdeprecated.h threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
arithmetic.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
basic.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
buf.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
colour.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
connection.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
conversion.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
convolution.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
create.h add a "wrap" option to vips_text() (#3130) 2022-11-10 15:46:46 +00:00
dbuf.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
debug.h Update address for Free Software Foundation 2013-03-07 00:40:19 -05:00
deprecated.h Minor cleanups (#2857) 2022-06-12 12:22:36 +01:00
dispatch.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
draw.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
enumtypes.c.in Update `glib-mkenums` templates (#2939) 2022-07-22 15:33:40 +01:00
enumtypes.h.in Update `glib-mkenums` templates (#2939) 2022-07-22 15:33:40 +01:00
error.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
foreign.h heifsave: make it possible to use a specific encoder (#3198) 2022-12-15 11:02:38 +00:00
format.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
freqfilt.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
gate.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
generate.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
header.h Revised threading system (#3105) 2022-10-26 15:25:19 +01:00
histogram.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
image.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
inlines.h Update address for Free Software Foundation 2013-03-07 00:40:19 -05:00
internal.h Revised threading system (#3105) 2022-10-26 15:25:19 +01:00
interpolate.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
intl.h Cleanup gettext handling (#2695) 2022-02-27 15:27:28 +00:00
mask.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
memory.h move tiff decompress outside lock (#2969) 2022-09-03 13:10:58 +01:00
meson.build Ensure `--vips-config` only prints build configuration (#3062) 2022-09-24 11:26:30 +01:00
morphology.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
mosaicing.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
object.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
operation.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
private.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
rect.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
region.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
resample.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
sbuf.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
semaphore.h threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
thread.h threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
threadpool.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
transform.h Enhance the introspection support by fixing annotations (#2657) 2022-02-15 10:54:40 +00:00
type.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
util.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
vector.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
version.h.in Remove `VIPS_EXEEXT` and `VIPS_SONAME` definitions (#2694) 2022-02-27 15:27:37 +00:00
video.h Improve symbol visibility (#2688) 2022-04-16 10:58:55 +01:00
vips.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00
vips7compat.h use G_GNUC_* attribute system 2022-09-23 14:37:35 +01:00