Megatest

Check-in [607db6ebc5]
Login
Overview
Comment:wip
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.64-synclaunch-threaded-q
Files: files | file ages | folders
SHA1: 607db6ebc528185a0c1c6f11265f28b95ecdda62
User & Date: bb on 2018-02-09 00:24:23
Other Links: branch diff | manifest | tags
Context
2018-02-12
01:18
wip Leaf check-in: 18868f44fd user: bb tags: v1.64-synclaunch-threaded-q
2018-02-09
00:24
wip check-in: 607db6ebc5 user: bb tags: v1.64-synclaunch-threaded-q
00:22
wip check-in: 9d523bb50a user: bb tags: v1.64-synclaunch-threaded-q
Changes

Modified example/q/threaded-queue.scm from [aa57fb9a85] to [0280ba0d98].

51
52
53
54
55
56
57





















58
59
60
61
62
63
64
               ('timeout
                ;;(print "job-thr("job-id")> timeout; pid="pid" before cond1")
                (cond
                 ((number? pid) ;; check if still running
                  ;;(print "job-thr("job-id")> timeout; pid="pid" cond1 pid-is-number branch")
                  (let-values (((pid-or-zero normal-exit exitcode-or-signal)
                                (process-wait pid #t)))





















                    ;;(print "job-thr("job-id")> pid-or-zero="pid-or-zero)
                    (cond
                     ((zero? pid-or-zero)
                      ;;(print "job-thr("job-id")> timeout; pid="pid" cond2 pid-or-zero is zero branch")
                      ;;(print "job-thr("job-id")> zero; loop.")
                      (loop pid))
                     (else







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
               ('timeout
                ;;(print "job-thr("job-id")> timeout; pid="pid" before cond1")
                (cond
                 ((number? pid) ;; check if still running
                  ;;(print "job-thr("job-id")> timeout; pid="pid" cond1 pid-is-number branch")
                  (let-values (((pid-or-zero normal-exit exitcode-or-signal)
                                (process-wait pid #t)))


                    ;; can get for large number of parallel threads (~ >= 42)
                    ;;                     Warning (#<thread: anonymous>): in thread: (process-wait) waiting for child process failed - No child processes: 11322
                    
                    ;; 	Call history:
                    
                    ;; 	threaded-queue.scm:56: ##sys#call-with-values	  
                    ;; 	threaded-queue.scm:57: process-wait	  	<--
                    
                    ;; Warning (#<thread: anonymous>): in thread: (process-wait) waiting for child process failed - No child processes: 11323did job 467
                    ;; did job 464
                    
                    ;; Warning (#<thread: anonymous>): in thread: (process-wait) waiting for child process failed - No child processes: 11318
                    
                    ;; 	Call history:
                    
                    ;; 	threaded-queue.scm:56: ##sys#call-with-values	  
                    ;; 	threaded-queue.scm:57: process-wait	  	<--
                    

                    ;;(print "job-thr("job-id")> pid-or-zero="pid-or-zero)
                    (cond
                     ((zero? pid-or-zero)
                      ;;(print "job-thr("job-id")> timeout; pid="pid" cond2 pid-or-zero is zero branch")
                      ;;(print "job-thr("job-id")> zero; loop.")
                      (loop pid))
                     (else
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324
325
326
    (q 'drain)
    ;;(q 'event-loop)
    ))

(define (test-submit-bunch2)
  (let* ((q (tjq:new qname: 'test-q sync-job-cap: 42)))
    (for-each (lambda (x)
                (let* ((cmd (conc "echo did job "x)))

                  (print "submit it--"x)
                  (q 'submit cmdline: cmd))
               )
             (iota 600))
    ;;(thread-sleep! 10)
    (q 'drain)
    ;;(q 'event-loop)
    ))

;(test-tjq-simple)
;;(test-submit)
;;(test-drain-simple)
(print "top")
(test-submit-bunch2)







|
>
|













326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
    (q 'drain)
    ;;(q 'event-loop)
    ))

(define (test-submit-bunch2)
  (let* ((q (tjq:new qname: 'test-q sync-job-cap: 42)))
    (for-each (lambda (x)
                ;;(let* ((cmd (conc "echo did job "x)))
                (let* ((cmd "/bin/true"))
                  ;;(print "submit it--"x)
                  (q 'submit cmdline: cmd))
               )
             (iota 600))
    ;;(thread-sleep! 10)
    (q 'drain)
    ;;(q 'event-loop)
    ))

;(test-tjq-simple)
;;(test-submit)
;;(test-drain-simple)
(print "top")
(test-submit-bunch2)