System.Data.SQLite

Check-in [b93163fd6e]
Login

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

Overview
Comment:Limit the total number of threads used by the test for ticket [72905c9a77].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b93163fd6e4c14489db6a490a2624517bfbe6456
User & Date: mistachkin 2014-01-30 14:00:25.858
Context
2014-01-31
00:28
More corrections to the batch testing tool to support testing 32-bit binaries on a 64-bit system. check-in: bd945366a4 user: mistachkin tags: trunk
2014-01-30
14:00
Limit the total number of threads used by the test for ticket [72905c9a77]. check-in: b93163fd6e user: mistachkin tags: trunk
11:29
Update SQLite core library to the latest trunk code. check-in: 8a6506c6ca user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/tkt-72905c9a77.eagle.
116
117
118
119
120
121
122



123
124
125
126
127
128
129
130
131
            //
            using (ManualResetEvent goEvent = new ManualResetEvent(false))
            {
              //
              // NOTE: Create 4 threads for each processor on the machine.
              //       Under normal circumstances, this should give us a good
              //       chance of triggering the race condition being tested.



              //
              int count = 4 * Environment.ProcessorCount;

              //
              // NOTE: Create a random number generator suitable for waiting a
              //       random number of milliseconds between each attempt to
              //       cause the race condition on a given thread.
              //
              Random random = new Random();







>
>
>

|







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
            //
            using (ManualResetEvent goEvent = new ManualResetEvent(false))
            {
              //
              // NOTE: Create 4 threads for each processor on the machine.
              //       Under normal circumstances, this should give us a good
              //       chance of triggering the race condition being tested.
              //       However, since this test was originally designed on a
              //       machine with 4 processors, limit the total number of
              //       threads to 16.
              //
              int count = Math.Min(4 * Environment.ProcessorCount, 16);

              //
              // NOTE: Create a random number generator suitable for waiting a
              //       random number of milliseconds between each attempt to
              //       cause the race condition on a given thread.
              //
              Random random = new Random();