Check-in [b03c6db3d1]
Overview
Comment:Updated to finalize a thread that terminated even if there are no current Tcl interpreters associated with it
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b03c6db3d19b2dbe2164abcdeeb4c09f2401614c
User & Date: rkeene on 2016-07-10 19:05:19
Other Links: manifest | tags
Context
2016-07-10
19:05
Fixed typo in debug message check-in: 936a791a4a user: rkeene tags: trunk
19:05
Updated to finalize a thread that terminated even if there are no current Tcl interpreters associated with it check-in: b03c6db3d1 user: rkeene tags: trunk
2015-12-08
14:13
Updated to avoid hammering remote servers if cache cannot be updated for some reason other than downloading failed check-in: df8e635cac user: rkeene tags: trunk
Changes

Modified appfsd.c from [33db21bdfd] to [9b20b616c9].

  1970   1970    * Terminate a thread
  1971   1971    */
  1972   1972   static void appfs_terminate_interp_and_thread(void *_interp) {
  1973   1973   	Tcl_Interp *interp;
  1974   1974   
  1975   1975   	APPFS_DEBUG("Called: _interp = %p", _interp);
  1976   1976   
  1977         -	if (_interp == NULL) {
         1977  +	if (_interp != NULL) {
         1978  +		interp = _interp;
         1979  +
         1980  +		APPFS_DEBUG("Terminating interpreter due to thread termination");
         1981  +
         1982  +		appfs_call_libtcl(
         1983  +			Tcl_DeleteInterp(interp);
         1984  +		)
         1985  +	} else {
  1978   1986   		APPFS_DEBUG("Terminating thread with no interpreter");
  1979         -
  1980         -		return;
  1981   1987   	}
  1982   1988   
  1983         -	interp = _interp;
  1984         -
  1985         -	APPFS_DEBUG("Terminating interpreter due to thread termination");
  1986         -
  1987         -	appfs_call_libtcl(
  1988         -		Tcl_DeleteInterp(interp);
  1989         -	)
  1990         -
  1991   1989   	appfs_call_libtcl(
  1992   1990   		Tcl_FinalizeThread();
  1993   1991   	)
  1994   1992   
  1995   1993   	return;
  1996   1994   }
  1997   1995