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

  1. --- tclIORChan.c
  2. +++ tclIORChan.c
  3. @@ -932,12 +932,15 @@
  4.  
  5. /*
  6. * We have the channel and the events to post.
  7. */
  8.  
  9. +#ifndef TCL_THREADS
  10. + Tcl_NotifyChannel (chan, events);
  11. +#else
  12. if (rcPtr->owner == rcPtr->thread) {
  13. - Tcl_NotifyChannel (chan, events);
  14. + Tcl_NotifyChannel (chan, events);
  15. } else {
  16. ReflectEvent* ev = ckalloc (sizeof (ReflectEvent));
  17. ev->header.proc = ReflectEventRun;
  18. ev->events = events;
  19. ev->rcPtr = rcPtr;
  20. @@ -963,11 +966,11 @@
  21. * XXX Actually, in that case the channel should be dead also !
  22. */
  23. Tcl_ThreadQueueEvent (rcPtr->owner, (Tcl_Event*) ev, TCL_QUEUE_TAIL);
  24. Tcl_ThreadAlert (rcPtr->owner);
  25. }
  26. -
  27. +#endif
  28. /*
  29. * Squash interp results left by the event script.
  30. */
  31.  
  32. Tcl_ResetResult(interp);
  33.