0030439: Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux
[occt.git] / tests / demo / draw / bug30430
CommitLineData
8de8dacd 1# testgrid demo draw -overwrite
2
3catch {cpulimit 10}
4
5package require Thread
6
7set NBTHREADS 1
8set NBWORKERS 1
9
10puts "Creating worker"
11set worker [tpool::create -minworkers $NBWORKERS -maxworkers $NBWORKERS]
12
13puts "Suspending worker"
14tpool::suspend $worker
15
16puts "Arranging jobs"
17for {set i 1} {$i <= $NBTHREADS} {incr i} {
18 set job [tpool::post $worker "puts Executing_job_$i"]
19 puts "Job $i: $job"
20# set job [tpool::post -nowait $worker "puts $i"]
21 set jobs($job) $job
22}
23
24puts "Resuming worker"
25tpool::resume $worker
26
27puts "Waiting while all threads complete"
28after 1000
29
30puts "Obtaining results"
31while { [llength [array names jobs]] > 0 } {
32 puts "Queue: [array names jobs]"
33
34 foreach job [tpool::wait $worker [array names jobs]] {
35 puts -nonewline "Completed $job: "
36 puts "[tpool::get $worker $job]"
37 unset jobs($job)
38 }
39}
40
41puts "Releasing worker"
42tpool::release $worker
43
44catch {cpulimit 0}
45
46puts "TEST COMPLETED"