libvips/libvips
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
..
arithmetic Ensure consistent formatting of `->format_table` (#3199) 2022-11-30 09:41:05 +00:00
colour block use of RGB profiles with CMYK images 2022-11-03 14:18:38 +00:00
conversion make arrayjoin much faster with large arrays 2022-12-29 20:50:22 +00:00
convolution Ensure consistent formatting of `->format_table` (#3199) 2022-11-30 09:41:05 +00:00
create add a "wrap" option to vips_text() (#3130) 2022-11-10 15:46:46 +00:00
deprecated threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
draw remove autotools (#2941) 2022-07-24 11:14:52 +01:00
foreign fix ppmload doc comment 2022-12-23 22:44:12 +00:00
freqfilt remove autotools (#2941) 2022-07-24 11:14:52 +01:00
histogram Ensure consistent formatting of `->format_table` (#3199) 2022-11-30 09:41:05 +00:00
include/vips threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
iofuncs threadset: stop idle threads after a regular timeout (#3253) 2023-01-03 12:00:35 +00:00
module remove autotools (#2941) 2022-07-24 11:14:52 +01:00
morphology remove autotools (#2941) 2022-07-24 11:14:52 +01:00
mosaicing remove autotools (#2941) 2022-07-24 11:14:52 +01:00
resample Merge branch '8.13' 2022-10-19 17:35:36 +01:00
Vips-8.0.metadata Introspection improvements (#3079) 2022-10-06 17:28:33 +01:00
meson.build nsgifload: avoid minimise after mapping (#3189) 2022-11-27 15:43:35 +00:00