Tcl Source Code

Artifact [8c247426c5]
Login

Artifact 8c247426c5fee7791c18136b6be3ab9a0d23c8d7:

Attachment "patch_thread_ext_stop_grinding_other_peoples_events.txt" to ticket [418693ffff] added by davygrvy 2001-04-25 07:31:33.
cvs diff threadCmd.c (in directory D:\thread_WS\thread\generic\)
Index: threadCmd.c
===================================================================
RCS file: /cvsroot/tcl/thread/generic/threadCmd.c,v
retrieving revision 1.20
diff -c -r1.20 threadCmd.c
*** threadCmd.c	2000/11/03 00:04:25	1.20
--- threadCmd.c	2001/04/25 00:13:30
***************
*** 1579,1601 ****
      ListRemove(tsdPtr);
  
      /*
!      * Delete all pending thread::send events.
!      * By doing this here, we avoid processing them below.
       */
  
      Tcl_DeleteEvents((Tcl_EventDeleteProc *)ThreadDeleteEvent, NULL);
- 
-     /*
-      * Run all other pending events which we can not sink otherwise.
-      * We assume that no runnable event will block us indefinitely
-      * or kick us into a infinite loop, otherwise we're stuck.
-      */
- 
-     eventFlags |= TCL_DONT_WAIT;
-     i=100;
-     while (Tcl_DoOneEvent(eventFlags) && (--i > 0)) {
-         ; /* empty loop */
-     }
  
      return TCL_OK;
  }
--- 1580,1592 ----
      ListRemove(tsdPtr);
  
      /*
!      * Delete all pending thread::send events.  These are events
!      * owned by us.  It is up to all other extensions (including Tk)
!      * to be responsible for there own events when they recieve a
!      * Tcl_CallWhenDeleted notice which will happen shortly.
       */
  
      Tcl_DeleteEvents((Tcl_EventDeleteProc *)ThreadDeleteEvent, NULL);
  
      return TCL_OK;
  }