Branch: Tag:

2021-05-04

2021-05-04 14:01:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Handlers: Fix issue causing handlers to be put on hold.

Callback functions in destructed objects caused handler threads
to enter the on hold state.

Fixes several cases of spurious ABSes.

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.634 2001/02/23 04:04:09 mast Exp $"; + constant cvs_version="$Id$";      // Used when running threaded to find out which thread is the backend thread.   Thread.Thread backend_thread;
502: Inside #if defined(THREADS)
   if(q=catch {    do {    THREAD_WERR("Handle thread ["+id+"] waiting for next event"); -  if(arrayp(h=handle_queue->read()) && h[0]) { +  if(arrayp(h = handle_queue->read())) { +  if (!h[0]) { +  THREAD_WERR(sprintf("Handle thread [%O] got NULL callback: %O(%{%O, %})", +  id, h[0], h[1] / 1)); +  continue; +  }    THREAD_WERR(sprintf("Handle thread [%O] calling %O(%{%O, %})",    id, h[0], h[1] / 1));    set_locale();