mORMot2 DailyDaily read of upstream commits

THttpServer thread-pool lifecycle callbacks restored

THttpServer now forwards its thread-start callback to the internal worker pool. This restores both OnHttpThreadStart and OnHttpThreadTerminate for pooled workers, which matters to applications that allocate and release per-thread state.

TL;DR

  • TSynThreadPoolTHttpServer now copies THttpServer.fOnThreadStart before creating its worker threads.
  • Pooled THttpServer workers once again run the paired start and termination callbacks; request processing and public signatures are unchanged.

Upgrade advice

Land on build 18239 at cb0cf6a7a53b9c8d3b3b9ab3f63509b4e23126ba. It contains the lifecycle-callback fix, and the payload lists no later same-routine fix in superseded_by.

Build2.4.18232 → 2.4.18239
Commits3
Lines+212 -18
Read1 min

1 of 1 entries · 3 commits upstream

# Entry Category Units
1 Medium THttpServer pooled workers now receive start and termination notifications In mormot.net.server, TSynThreadPoolTHttpServer.Create now copies fServer.fOnThreadStart into the pool's fOnThreadStart field, alongside the existing fOnThreadTerminate copy. TSynThreadPoolWorkThread.Execute can therefore call the configured start handler and set StartNotified; TSynThread.DoTerminate then permits the matching termination handler to run. Fixes mormot.net.server 40e03307+1-0

net: THttpServer OnThreadStart/OnThreadTerminate events were never called for its thread pool

Impact

Before this fix, Delphi and FPC applications using the socket-based THttpServer thread pool did not receive OnHttpThreadStart for pooled workers. Because StartNotified remained unset, OnHttpThreadTerminate was skipped as well, so per-thread initialization and cleanup such as TRest.EndCurrentThread could be missed. Applications without these handlers, and non-pooled server implementations, keep their existing behaviour.

Public API

  • THttpServerGeneric.OnHttpThreadStartbehaviour-changed — The existing event now fires for TSynThreadPoolTHttpServer workers instead of being silently skipped.
  • THttpServerGeneric.OnHttpThreadTerminatebehaviour-changed — The existing event now follows a successful pooled-worker start notification because StartNotified is set.

mobius1qwe · 01:06 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits1007
Active days49/60
Busiest2026-09-30
Peak60
2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 12 commits2026-10-11: 2 commits2026-10-12: 40 commits2026-10-13: 31 commits2026-10-14: 23 commits2026-10-15: 16 commits2026-10-16: 27 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 3 commits2026-10-23: 6 commits2026-10-24: 29 commits2026-10-25: 7 commits2026-10-26: 25 commits2026-10-27: 4 commits2026-10-28: 8 commits2026-10-29: 17 commits2026-10-30: 20 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 16 commits2026-11-03: 32 commits2026-11-04: 15 commits2026-11-05: 32 commits2026-11-06: 26 commits2026-11-07: 19 commits2026-11-08: 2 commits2026-11-09: 29 commits2026-11-10: 17 commits2026-11-11: 8 commits2026-11-12: 38 commits2026-11-13: 39 commits2026-11-14: 9 commits2026-11-15: 6 commits2026-11-16: 21 commits2026-11-17: 30 commits2026-11-18: 37 commits2026-11-19: 28 commits2026-11-20: 31 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 1 commit2026-11-24: 6 commits2026-11-25: 3 commits2026-11-26: 3 commits2026-11-27: 0 commits2026-11-28: 0 commits
2026-09-302026-11-28