diff options
author | sebres <sebres@users.sourceforge.net> | 2017-07-10 10:58:42 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-07-10 10:58:42 (GMT) |
commit | 8383ac341f0de983f9df6eb589ee893a2ac11aba (patch) | |
tree | 74343692a84ad63128be4d3d65028f88f7b567d7 | |
parent | acd0d32a48312257b175680de2a743a2e31510cc (diff) | |
download | tcl-8383ac341f0de983f9df6eb589ee893a2ac11aba.zip tcl-8383ac341f0de983f9df6eb589ee893a2ac11aba.tar.gz tcl-8383ac341f0de983f9df6eb589ee893a2ac11aba.tar.bz2 |
avoid blocking wait if we've some retarded events (from last event-cycle) and max blocking time was not set outside an event source traversal.
-rw-r--r-- | generic/tclNotify.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tclNotify.c b/generic/tclNotify.c index baed116..28c3879 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -1077,6 +1077,18 @@ SetUpEventSources( } tsdPtr->inTraversal--; + /* + * If we've some retarded events (from last event-cycle), wait non-blocking. + */ + if ( tsdPtr->firstRetardEv + && ( !tsdPtr->blockTimeSet + || tsdPtr->blockTimeServLev < tsdPtr->serviceLevel ) + ) { + tsdPtr->blockTime.sec = 0; + tsdPtr->blockTime.usec = 0; + tsdPtr->blockTimeSet = 1; + } + return res; } |