Posted to tcl by venks at Fri May 18 08:11:59 GMT 2012view pretty

--- tclIORChan.c                                                                                                                
+++ tclIORChan.c                                                                                                                
@@ -932,12 +932,15 @@
                                                                                                                                
     /*                                                                                                                         
      * We have the channel and the events to post.                                                                             
      */                                                                                                                        
                                                                                                                                
+#ifndef TCL_THREADS                                                                                                            
+       Tcl_NotifyChannel (chan, events);                                                                                       
+#else                                                                                                                          
     if (rcPtr->owner == rcPtr->thread) {                                                                                       
-        Tcl_NotifyChannel (chan, events);                                                                                      
+       Tcl_NotifyChannel (chan, events);                                                                                       
     } else {                                                                                                                   
         ReflectEvent* ev = ckalloc (sizeof (ReflectEvent));                                                                    
         ev->header.proc = ReflectEventRun;                                                                                     
         ev->events = events;                                                                                                   
         ev->rcPtr = rcPtr;                                                                                                     
@@ -963,11 +966,11 @@
          * XXX Actually, in that case the channel should be dead also !                                                        
          */                                                                                                                    
         Tcl_ThreadQueueEvent (rcPtr->owner, (Tcl_Event*) ev, TCL_QUEUE_TAIL);                                                  
         Tcl_ThreadAlert (rcPtr->owner);                                                                                        
     }                                                                                                                          
-                                                                                                                               
+#endif                                                                                                                         
     /*                                                                                                                         
      * Squash interp results left by the event script.                                                                         
      */                                                                                                                        
                                                                                                                                
     Tcl_ResetResult(interp);