File tree Expand file tree Collapse file tree
constantine/threadpool/crossthread Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -700,6 +700,7 @@ const testDescThreadpool: seq[string] = @[
700700 " benchmarks-threadpool/matrix_transposition/threadpool_transposes.nim" ,
701701 " benchmarks-threadpool/histogram_2D/threadpool_histogram.nim" ,
702702 " benchmarks-threadpool/logsumexp/threadpool_logsumexp.nim" ,
703+ " tests/threadpool/t_257_threads.nim" ,
703704]
704705
705706const testDescMultithreadedCrypto: seq [string ] = @ [
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const # bitfield setup
6060 # - Xeon Platinum 8490H, 60C/120T per socket
6161 # - up to 8 sockets: 960 threads
6262
63- kPreWaitShift = 8 'u32
63+ kPreWaitShift = 16 'u32
6464 kPreWait = 1 'u32 shl kPreWaitShift
6565 kWait = 1 'u32
6666 kCommitToWait = kWait - kPreWait
Original file line number Diff line number Diff line change 1+ import constantine/ threadpool
2+
3+ # Just check this won't hang
4+ const numThreads = 257
5+ const numTasks = numThreads * 4
6+
7+ proc nothing () =
8+ discard
9+
10+ proc main () =
11+ echo " \n =============================================================================================="
12+ echo " Running 'tests/threadpool/t_257_threads.nim'"
13+ echo " =============================================================================================="
14+
15+ let tp = Threadpool .new (numThreads = numThreads)
16+ for _ in 0 ..< numTasks:
17+ tp.spawn nothing ()
18+ tp.shutdown ()
19+
20+ echo " ok"
21+
22+ main ()
You can’t perform that action at this time.
0 commit comments