Tcl Source Code

Check-in [f2a0a1891c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Implement tip 398 : Quickly Exit with Non-Blocking Blocked Channels. This is simply a revert of the (C part of the) 1025712d5b commit of 2011-08-17.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-398-impl
Files: files | file ages | folders
SHA1: f2a0a1891ce7e463df2a6fa6f32b071427ebd550
User & Date: ferrieux 2012-03-22 07:33:06
Context
2012-03-22
08:04
Take two. Don't forget to apply all patches, even when the phone rings in between. check-in: 83c38b0c0d user: ferrieux tags: tip-398-impl
07:33
Implement tip 398 : Quickly Exit with Non-Blocking Blocked Channels. This is simply a revert of the ... check-in: f2a0a1891c user: ferrieux tags: tip-398-impl
2012-03-20
11:59
[Bug 3508771] load tclreg.dll in cygwin tclsh check-in: 8f9c16848b user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclIO.c.

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
	 */

	active = 0;
	for (statePtr = tsdPtr->firstCSPtr;
		statePtr != NULL;
		statePtr = statePtr->nextCSPtr) {
	    chanPtr = statePtr->topChanPtr;
            if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED | CHANNEL_DEAD)
                || GotFlag(statePtr, BG_FLUSH_SCHEDULED)) {
		active = 1;
		break;
	    }
	}

	/*
	 * We've found a live channel. Close it.







|
|







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
	 */

	active = 0;
	for (statePtr = tsdPtr->firstCSPtr;
		statePtr != NULL;
		statePtr = statePtr->nextCSPtr) {
	    chanPtr = statePtr->topChanPtr;
	    if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED |
		    CHANNEL_DEAD)) {
		active = 1;
		break;
	    }
	}

	/*
	 * We've found a live channel. Close it.
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468

		(void) Tcl_Close(NULL, (Tcl_Channel) chanPtr);
	    } else {
		/*
		 * The refcount is greater than zero, so flush the channel.
		 */

                ResetFlag(statePtr, BG_FLUSH_SCHEDULED);
		Tcl_Flush((Tcl_Channel) chanPtr);

		/*
		 * Call the device driver to actually close the underlying
		 * device for this channel.
		 */








<







454
455
456
457
458
459
460

461
462
463
464
465
466
467

		(void) Tcl_Close(NULL, (Tcl_Channel) chanPtr);
	    } else {
		/*
		 * The refcount is greater than zero, so flush the channel.
		 */


		Tcl_Flush((Tcl_Channel) chanPtr);

		/*
		 * Call the device driver to actually close the underlying
		 * device for this channel.
		 */