/ Check-in [684eae66]
Login

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

Overview
Comment:Call Tcl_ExitThread() from within threads created using Tcl_CreateThread(). Not doing so causes notifier related errors on OSX.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 684eae6623ef1d0336b7a734b17ed307c720b6f4
User & Date: dan 2010-07-05 12:54:08
Context
2010-07-05
14:54
Do not report an error if the open-file-count is not as it should be after running a multi-threaded test. The counter instrumentation is not thread-safe. check-in: ea80b21c user: dan tags: trunk
12:54
Call Tcl_ExitThread() from within threads created using Tcl_CreateThread(). Not doing so causes notifier related errors on OSX. check-in: 684eae66 user: dan tags: trunk
05:54
Add any files specified as part of the QUICKTEST_INCLUDE environment variable to the set of test files run as part of "make test". Release testing uses this trick. check-in: a40a6e7d user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_async.c.

80
81
82
83
84
85
86

87
88
89
90
91
92
93
}

static Tcl_ThreadCreateType tclWriterThread(ClientData pIsStarted){
  Tcl_MutexLock(&testasync_g_writerMutex);
  *((int *)pIsStarted) = 1;
  sqlite3async_run();
  Tcl_MutexUnlock(&testasync_g_writerMutex);

  TCL_THREAD_CREATE_RETURN;
}

/*
** sqlite3async_start
**
** Start a new writer thread.







>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
}

static Tcl_ThreadCreateType tclWriterThread(ClientData pIsStarted){
  Tcl_MutexLock(&testasync_g_writerMutex);
  *((int *)pIsStarted) = 1;
  sqlite3async_run();
  Tcl_MutexUnlock(&testasync_g_writerMutex);
  Tcl_ExitThread(0);
  TCL_THREAD_CREATE_RETURN;
}

/*
** sqlite3async_start
**
** Start a new writer thread.

Changes to src/test_thread.c.

146
147
148
149
150
151
152

153
154
155
156
157
158
159
  Tcl_ListObjAppendElement(interp, pList, pRes);
  postToParent(p, pList);

  ckfree((void *)p);
  Tcl_DecrRefCount(pList);
  Tcl_DecrRefCount(pRes);
  Tcl_DeleteInterp(interp);

  TCL_THREAD_CREATE_RETURN;
}

/*
** sqlthread spawn VARNAME SCRIPT
**
**     Spawn a new thread with its own Tcl interpreter and run the







>







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
  Tcl_ListObjAppendElement(interp, pList, pRes);
  postToParent(p, pList);

  ckfree((void *)p);
  Tcl_DecrRefCount(pList);
  Tcl_DecrRefCount(pRes);
  Tcl_DeleteInterp(interp);
  Tcl_ExitThread(0);
  TCL_THREAD_CREATE_RETURN;
}

/*
** sqlthread spawn VARNAME SCRIPT
**
**     Spawn a new thread with its own Tcl interpreter and run the