starting thread 1 -- 1 alive starting thread 2 -- 2 alive thread 1 randomizing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] starting thread 3 -- 3 alive thread 3 randomizing array thread 3 randomizing done thread 2 randomizing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] starting thread 4 -- 3 alive thread 4 randomizing array thread 4 randomizing done starting thread 5 -- 3 alive thread 5 randomizing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] starting thread 6 -- 4 alive thread 6 randomizing array thread 6 randomizing done thread 1 sorting [9, 3, 5, 2, 0, 7, 6, 8, 1, 4] thread 2 sorting [3, 17, 9, 18, 16, 5, 1, 2, 8, 0, 7, 14, 6, 13, 12, 11, 4, 19, 15, 10] starting thread 7 -- 4 alive starting thread 8 -- 5 alive thread 8 qsort 0 10 starting thread 9 -- 6 alive thread 9 qsort 0 20 thread 7 randomizing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39] thread 5 sorting [26, 0, 19, 15, 6, 23, 1, 14, 25, 18, 10, 11, 3, 16, 28, 7, 4, 9, 12, 17, 2, 20, 8, 21, 13, 24, 22, 5, 29, 27] starting thread 11 -- 7 alive starting thread 10 -- 8 alive thread 11 qsort 0 9 starting thread 12 -- 9 alive starting thread 13 -- 10 alive starting thread 14 -- 11 alive thread 12 qsort 0 3 thread 10 randomizing [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49] thread 14 qsort 0 30 thread 13 randomizing array thread 13 randomizing done starting thread 15 -- 11 alive starting thread 16 -- 12 alive thread 15 qsort 10 10 thread 15 qsort done thread 16 qsort 0 4 starting thread 17 -- 12 alive starting thread 18 -- 13 alive thread 7 sorting [16, 27, 29, 36, 4, 11, 13, 31, 19, 8, 5, 30, 6, 38, 2, 26, 33, 0, 18, 15, 14, 39, 7, 3, 9, 1, 28, 32, 20, 34, 17, 24, 10, 12, 22, 25, 35, 21, 23, 37] starting thread 19 -- 14 alive thread 17 qsort 4 20 thread 18 qsort 0 0 thread 18 qsort done starting thread 20 -- 14 alive thread 19 randomizing array thread 19 randomizing done starting thread 21 -- 14 alive thread 20 qsort 0 26 thread 21 qsort 0 1 thread 21 qsort done starting thread 22 -- 14 alive starting thread 23 -- 15 alive thread 22 qsort 5 9 thread 23 qsort 0 40 starting thread 24 -- 16 alive starting thread 25 -- 17 alive thread 24 qsort 1 3 thread 25 qsort 4 16 starting thread 26 -- 18 alive starting thread 27 -- 19 alive thread 26 qsort 27 30 starting thread 28 -- 20 alive thread 10 sorting [39, 32, 12, 46, 16, 1, 33, 44, 8, 49, 25, 17, 3, 38, 4, 20, 41, 30, 27, 6, 15, 10, 35, 42, 26, 40, 45, 13, 31, 24, 29, 43, 19, 18, 48, 0, 21, 37, 28, 5, 34, 9, 14, 11, 36, 23, 7, 2, 22, 47] thread 27 qsort 0 5 starting thread 29 -- 21 alive thread 28 qsort 2 4 starting thread 30 -- 22 alive thread 29 qsort 5 7 starting thread 31 -- 23 alive thread 30 qsort 0 16 starting thread 32 -- 24 alive thread 31 qsort 1 1 thread 31 qsort done starting thread 33 -- 24 alive thread 32 qsort 4 10 starting thread 34 -- 25 alive thread 33 qsort 27 28 thread 33 qsort done starting thread 35 -- 25 alive thread 34 qsort 6 26 starting thread 36 -- 26 alive thread 35 qsort 0 50 starting thread 37 -- 27 alive thread 36 qsort 0 2 starting thread 38 -- 28 alive thread 37 qsort 2 2 thread 37 qsort done starting thread 39 -- 28 alive thread 38 qsort 8 9 thread 38 qsort done starting thread 40 -- 28 alive thread 39 qsort 5 5 thread 39 qsort done starting thread 41 -- 28 alive thread 40 qsort 17 40 starting thread 42 -- 29 alive thread 41 qsort 0 12 starting thread 43 -- 30 alive thread 42 qsort 17 20 starting thread 44 -- 31 alive thread 43 qsort 2 3 thread 43 qsort done starting thread 45 -- 31 alive thread 44 qsort 11 16 starting thread 46 -- 32 alive thread 45 qsort 4 4 thread 45 qsort done starting thread 47 -- 32 alive thread 46 qsort 29 30 thread 46 qsort done starting thread 48 -- 32 alive thread 47 qsort 6 19 starting thread 49 -- 33 alive thread 48 qsort 0 39 thread 24 qsort done starting thread 50 -- 33 alive thread 49 qsort 3 5 thread 12 qsort done starting thread 51 -- 33 alive thread 50 qsort 0 1 thread 50 qsort done starting thread 52 -- 33 alive thread 51 qsort 6 7 thread 51 qsort done thread 26 qsort done starting thread 53 -- 32 alive thread 52 qsort 17 19 starting thread 54 -- 33 alive thread 53 qsort 13 16 starting thread 55 -- 34 alive thread 54 qsort 0 10 starting thread 56 -- 35 alive thread 55 qsort 17 19 starting thread 57 -- 36 alive thread 56 qsort 3 4 thread 56 qsort done thread 29 qsort done starting thread 58 -- 35 alive thread 57 qsort 11 13 thread 22 qsort done starting thread 59 -- 35 alive thread 58 qsort 5 10 starting thread 60 -- 36 alive thread 59 qsort 20 26 starting thread 61 -- 37 alive thread 60 qsort 6 13 starting thread 62 -- 38 alive thread 61 qsort 40 50 thread 28 qsort done starting thread 63 -- 38 alive thread 62 qsort 0 22 thread 16 qsort done starting thread 64 -- 38 alive thread 63 qsort 3 3 thread 63 qsort done thread 11 qsort done starting thread 65 -- 37 alive thread 64 qsort 2 2 thread 64 qsort done thread 8 qsort done starting thread 66 -- 36 alive thread 65 qsort 20 40 thread 1 entering barrier starting thread 67 -- 37 alive thread 66 qsort 17 17 thread 66 qsort done starting thread 68 -- 37 alive thread 67 qsort 13 14 thread 67 qsort done starting thread 69 -- 37 alive thread 68 qsort 11 12 thread 68 qsort done starting thread 70 -- 37 alive thread 69 qsort 0 1 thread 69 qsort done thread 36 qsort done starting thread 71 -- 36 alive thread 70 qsort 20 20 thread 70 qsort done starting thread 72 -- 36 alive thread 71 qsort 17 17 thread 71 qsort done starting thread 73 -- 36 alive thread 72 qsort 14 16 starting thread 74 -- 37 alive thread 73 qsort 11 11 thread 73 qsort done starting thread 75 -- 37 alive thread 74 qsort 5 5 thread 74 qsort done starting thread 76 -- 37 alive thread 75 qsort 20 20 thread 75 qsort done starting thread 77 -- 37 alive thread 76 qsort 14 19 starting thread 78 -- 38 alive thread 77 qsort 6 8 starting thread 79 -- 39 alive thread 78 qsort 40 43 starting thread 80 -- 40 alive thread 79 qsort 23 39 starting thread 81 -- 41 alive thread 80 qsort 0 2 starting thread 82 -- 42 alive thread 81 qsort 4 5 thread 81 qsort done starting thread 83 -- 42 alive thread 82 qsort 20 29 starting thread 84 -- 43 alive thread 83 qsort 18 19 thread 83 qsort done starting thread 85 -- 43 alive thread 84 qsort 15 16 thread 84 qsort done starting thread 86 -- 43 alive thread 85 qsort 2 10 starting thread 87 -- 44 alive thread 86 qsort 18 19 thread 86 qsort done thread 49 qsort done starting thread 88 -- 43 alive thread 87 qsort 14 14 thread 87 qsort done thread 27 qsort done starting thread 89 -- 42 alive thread 88 qsort 12 13 thread 88 qsort done thread 52 qsort done starting thread 90 -- 41 alive thread 89 qsort 6 10 thread 53 qsort done starting thread 91 -- 41 alive thread 90 qsort 21 26 starting thread 92 -- 42 alive thread 91 qsort 14 18 thread 55 qsort done starting thread 93 -- 42 alive thread 92 qsort 9 13 thread 42 qsort done starting thread 94 -- 42 alive thread 93 qsort 6 6 thread 93 qsort done thread 57 qsort done starting thread 95 -- 41 alive thread 94 qsort 44 50 starting thread 96 -- 42 alive thread 95 qsort 40 42 starting thread 97 -- 43 alive thread 96 qsort 23 29 starting thread 98 -- 44 alive thread 97 qsort 3 22 starting thread 99 -- 45 alive thread 98 qsort 0 0 thread 98 qsort done starting thread 100 -- 45 alive thread 99 qsort 30 40 starting thread 101 -- 46 alive thread 100 qsort 20 23 starting thread 102 -- 47 alive thread 101 qsort 2 8 starting thread 103 -- 48 alive thread 102 qsort 15 16 thread 102 qsort done starting thread 104 -- 48 alive thread 103 qsort 6 9 starting thread 105 -- 49 alive thread 104 qsort 21 25 starting thread 106 -- 50 alive thread 105 qsort 19 19 thread 105 qsort done starting thread 107 -- 50 alive thread 106 qsort 14 14 thread 106 qsort done starting thread 108 -- 50 alive thread 107 qsort 9 10 thread 107 qsort done thread 72 qsort done starting thread 109 -- 49 alive thread 108 qsort 7 8 thread 108 qsort done thread 44 qsort done starting thread 110 -- 48 alive thread 109 qsort 44 45 thread 109 qsort done starting thread 111 -- 48 alive thread 110 qsort 43 43 thread 110 qsort done starting thread 112 -- 48 alive thread 111 qsort 40 41 thread 111 qsort done starting thread 113 -- 48 alive thread 112 qsort 30 39 starting thread 114 -- 49 alive thread 113 qsort 23 24 thread 113 qsort done thread 77 qsort done starting thread 115 -- 48 alive thread 114 qsort 3 12 starting thread 116 -- 49 alive thread 115 qsort 1 2 thread 115 qsort done starting thread 117 -- 49 alive thread 116 qsort 30 36 starting thread 118 -- 50 alive thread 117 qsort 24 29 starting thread 119 -- 51 alive thread 118 qsort 20 21 thread 118 qsort done starting thread 120 -- 51 alive thread 119 qsort 9 10 thread 119 qsort done starting thread 121 -- 51 alive thread 120 qsort 2 3 thread 120 qsort done thread 80 qsort done starting thread 122 -- 50 alive thread 121 qsort 10 10 thread 121 qsort done starting thread 123 -- 50 alive thread 122 qsort 6 6 thread 122 qsort done starting thread 124 -- 50 alive thread 123 qsort 26 26 thread 123 qsort done starting thread 125 -- 50 alive thread 124 qsort 21 22 thread 124 qsort done starting thread 126 -- 50 alive thread 125 qsort 15 18 starting thread 127 -- 51 alive thread 126 qsort 46 50 starting thread 128 -- 52 alive thread 127 qsort 42 42 thread 127 qsort done starting thread 129 -- 52 alive thread 128 qsort 30 32 starting thread 130 -- 53 alive thread 129 qsort 11 13 starting thread 131 -- 54 alive thread 130 qsort 25 29 starting thread 132 -- 55 alive thread 131 qsort 13 22 starting thread 133 -- 56 alive thread 132 qsort 3 7 thread 95 qsort done starting thread 134 -- 56 alive thread 133 qsort 37 40 thread 78 qsort done starting thread 135 -- 56 alive thread 134 qsort 30 34 starting thread 136 -- 57 alive thread 135 qsort 24 24 thread 135 qsort done starting thread 137 -- 57 alive thread 136 qsort 22 23 thread 136 qsort done starting thread 138 -- 57 alive thread 137 qsort 4 8 starting thread 139 -- 58 alive thread 138 qsort 7 9 starting thread 140 -- 59 alive thread 139 qsort 23 25 starting thread 141 -- 60 alive thread 140 qsort 15 15 thread 140 qsort done starting thread 142 -- 60 alive thread 141 qsort 46 49 thread 100 qsort done starting thread 143 -- 60 alive thread 142 qsort 33 39 starting thread 144 -- 61 alive thread 143 qsort 30 30 thread 143 qsort done starting thread 145 -- 61 alive thread 144 qsort 11 11 thread 144 qsort done starting thread 146 -- 61 alive thread 145 qsort 25 28 starting thread 147 -- 62 alive thread 146 qsort 13 19 starting thread 148 -- 63 alive thread 147 qsort 8 12 starting thread 149 -- 64 alive thread 148 qsort 3 5 starting thread 150 -- 65 alive thread 149 qsort 37 38 thread 149 qsort done starting thread 151 -- 65 alive thread 150 qsort 35 36 thread 150 qsort done starting thread 152 -- 65 alive thread 151 qsort 30 30 thread 151 qsort done starting thread 153 -- 65 alive thread 152 qsort 25 29 starting thread 154 -- 66 alive thread 153 qsort 4 6 starting thread 155 -- 67 alive thread 154 qsort 7 8 thread 154 qsort done starting thread 156 -- 67 alive thread 155 qsort 23 23 thread 155 qsort done starting thread 157 -- 67 alive thread 156 qsort 16 18 starting thread 158 -- 68 alive thread 157 qsort 50 50 thread 157 qsort done starting thread 159 -- 68 alive thread 158 qsort 46 47 thread 158 qsort done starting thread 160 -- 68 alive thread 159 qsort 33 38 starting thread 161 -- 69 alive thread 160 qsort 31 32 thread 160 qsort done starting thread 162 -- 69 alive thread 161 qsort 12 13 thread 161 qsort done starting thread 163 -- 69 alive thread 162 qsort 25 27 starting thread 164 -- 70 alive thread 163 qsort 20 22 starting thread 165 -- 71 alive thread 164 qsort 13 13 thread 164 qsort done starting thread 166 -- 71 alive thread 165 qsort 8 10 thread 128 qsort done starting thread 167 -- 71 alive thread 166 qsort 6 7 thread 166 qsort done thread 129 qsort done starting thread 168 -- 70 alive thread 167 qsort 3 4 thread 167 qsort done thread 92 qsort done starting thread 169 -- 69 alive thread 168 qsort 39 40 thread 168 qsort done thread 60 qsort done starting thread 170 -- 68 alive thread 169 qsort 29 29 thread 169 qsort done starting thread 171 -- 68 alive thread 170 qsort 31 34 starting thread 172 -- 69 alive thread 171 qsort 25 26 thread 171 qsort done starting thread 173 -- 69 alive thread 172 qsort 7 8 thread 172 qsort done starting thread 174 -- 69 alive thread 173 qsort 4 4 thread 173 qsort done thread 133 qsort done starting thread 175 -- 68 alive thread 174 qsort 9 9 thread 174 qsort done starting thread 176 -- 68 alive thread 175 qsort 24 25 thread 175 qsort done starting thread 177 -- 68 alive thread 176 qsort 16 16 thread 176 qsort done starting thread 178 -- 68 alive thread 177 qsort 48 49 thread 177 qsort done starting thread 179 -- 68 alive thread 178 qsort 39 39 thread 178 qsort done starting thread 180 -- 68 alive thread 179 qsort 33 35 thread 138 qsort done starting thread 181 -- 68 alive thread 180 qsort 28 28 thread 180 qsort done thread 139 qsort done thread 103 qsort done starting thread 182 -- 66 alive thread 181 qsort 25 26 thread 181 qsort done thread 104 qsort done thread 89 qsort done starting thread 183 -- 64 alive thread 182 qsort 20 20 thread 182 qsort done thread 141 qsort done thread 90 qsort done thread 58 qsort done starting thread 184 -- 61 alive thread 183 qsort 14 19 thread 126 qsort done thread 59 qsort done thread 32 qsort done starting thread 185 -- 59 alive thread 184 qsort 11 12 thread 184 qsort done thread 94 qsort done thread 25 qsort done starting thread 186 -- 57 alive thread 185 qsort 8 9 thread 185 qsort done thread 61 qsort done thread 17 qsort done starting thread 187 -- 55 alive thread 186 qsort 5 5 thread 186 qsort done thread 9 qsort done starting thread 188 -- 54 alive thread 187 qsort 31 31 thread 187 qsort done thread 2 entering barrier starting thread 189 -- 54 alive thread 188 qsort 27 29 starting thread 190 -- 55 alive thread 189 qsort 5 6 thread 189 qsort done starting thread 191 -- 55 alive thread 190 qsort 17 18 thread 190 qsort done starting thread 192 -- 55 alive thread 191 qsort 36 38 thread 148 qsort done starting thread 193 -- 55 alive thread 192 qsort 33 34 thread 192 qsort done thread 132 qsort done starting thread 194 -- 54 alive thread 193 qsort 27 27 thread 193 qsort done starting thread 195 -- 54 alive thread 194 qsort 14 18 thread 153 qsort done starting thread 196 -- 54 alive thread 195 qsort 10 10 thread 195 qsort done thread 156 qsort done thread 137 qsort done starting thread 197 -- 52 alive thread 196 qsort 32 34 thread 125 qsort done thread 101 qsort done starting thread 198 -- 51 alive thread 197 qsort 21 22 thread 197 qsort done thread 91 qsort done thread 85 qsort done starting thread 199 -- 49 alive thread 198 qsort 27 28 thread 198 qsort done thread 162 qsort done thread 76 qsort done thread 54 qsort done starting thread 200 -- 46 alive thread 199 qsort 36 37 thread 199 qsort done thread 145 qsort done thread 47 qsort done thread 41 qsort done starting thread 201 -- 43 alive thread 200 qsort 35 35 thread 200 qsort done thread 165 qsort done thread 130 qsort done thread 34 qsort done thread 30 qsort done starting thread 202 -- 39 alive thread 201 qsort 19 19 thread 201 qsort done thread 147 qsort done thread 96 qsort done thread 20 qsort done starting thread 203 -- 36 alive thread 202 qsort 14 14 thread 202 qsort done thread 163 qsort done thread 114 qsort done thread 14 qsort done thread 203 qsort 32 33 thread 203 qsort done thread 5 entering barrier starting thread 204 -- 32 alive thread 204 qsort 38 38 thread 204 qsort done thread 179 qsort done starting thread 206 -- 31 alive starting thread 205 -- 32 alive thread 206 qsort 29 29 thread 206 qsort done thread 205 qsort 15 18 starting thread 208 -- 32 alive starting thread 207 -- 33 alive thread 208 qsort 15 16 thread 208 qsort done thread 207 qsort 34 34 thread 207 qsort done thread 191 qsort done thread 159 qsort done thread 142 qsort done thread 112 qsort done thread 79 qsort done thread 188 qsort done thread 152 qsort done thread 117 qsort done thread 82 qsort done starting thread 209 -- 23 alive thread 209 qsort 17 18 thread 209 qsort done thread 196 qsort done thread 170 qsort done thread 134 qsort done thread 116 qsort done thread 99 qsort done thread 65 qsort done thread 40 qsort done thread 23 qsort done thread 7 entering barrier thread 205 qsort done thread 194 qsort done thread 183 qsort done thread 146 qsort done thread 131 qsort done thread 97 qsort done thread 62 qsort done thread 48 qsort done thread 35 qsort done thread 10 entering barrier thread 10 leaving barrier thread 5 leaving barrier thread 2 leaving barrier thread 1 leaving barrier thread 7 leaving barrier all threads done, and checking results ... test passed! 209 threads created in all