From 3cc210b6d0579358daa94a0f3670e30c973b7f34 Mon Sep 17 00:00:00 2001 From: ferrieux Date: Tue, 22 May 2012 20:28:48 +0000 Subject: Use zero-delays instead of finite ones when posting fileevents, because (1) they should be zero in the first place (see UpdateInterest) and (2) ever-reposting cases will be detected with greater ease. --- generic/tclIORTrans.c | 9 +-------- generic/tclZlib.c | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 5d99f73..fd25f2d 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -439,13 +439,6 @@ static const char *msg_dstlost = */ /* - * Number of milliseconds to wait before firing an event to try to flush out - * information waiting in buffers (fileevent support). - */ - -#define FLUSH_DELAY (5) - -/* * Helper functions encapsulating some of the thread forwarding to make the * control flow in callers easier. */ @@ -2861,7 +2854,7 @@ TimerSetup( return; } - rtPtr->timer = Tcl_CreateTimerHandler(FLUSH_DELAY, TimerRun, rtPtr); + rtPtr->timer = Tcl_CreateTimerHandler(0, TimerRun, rtPtr); } /* diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 540b779..731176c 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -114,13 +114,6 @@ typedef struct { #define DEFAULT_BUFFER_SIZE 4096 /* - * Time to wait (in milliseconds) before flushing the channel when reading - * data through the transform. - */ - -#define TRANSFORM_FLUSH_DELAY 5 - -/* * Convenience macro to make some casts easier to use. */ @@ -2737,7 +2730,7 @@ ZlibTransformTimerSetup( ZlibChannelData *cd) { if (cd->timer == NULL) { - cd->timer = Tcl_CreateTimerHandler(TRANSFORM_FLUSH_DELAY, + cd->timer = Tcl_CreateTimerHandler(0, ZlibTransformTimerRun, cd); } } -- cgit v0.12