Ticket #993: lock-free-hash-table-test-4.lisp

File lock-free-hash-table-test-4.lisp, 477 bytes (added by uchida, 21 months ago)
Line 
1;;(egc nil)
2(configure-egc 64 2048 2048)
3
4(defvar *tbl* (make-hash-table))
5
6(defun run-test ()
7  (dotimes (i 1000)
8    (print i)
9    (dotimes (j 100)
10      (let ((k (cons nil nil)))
11        (setf (gethash k *tbl*) 0)
12        (setf (gethash k *tbl*) 0)
13        (setf (gethash k *tbl*) 0)))))
14
15(defun busy-loop-thread ()
16  (process-run-function "busy-loop-thread"
17                        #'(lambda ()
18                            (loop
19                             (loop for i from 1 to 100000 collect i)))))
20
21(busy-loop-thread)
22
23(run-test)