-
-
Save AeroNotix/fd0d7c4d62ac35ff2095d7bfcd6ab8de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ql:quickload :stmx) | |
(defparameter y 0) | |
(defmacro set-it (it) | |
`(let ((success nil) | |
(started? (stmx.lang:hw-transaction-begin)) | |
(r (random 100))) | |
(when (eq started? stmx.lang:+hw-transaction-started+) | |
(setf ,it r) | |
(setf success t) | |
(stmx.lang:hw-transaction-end)) | |
started?)) | |
(length | |
(sb-sys:without-gcing | |
(remove stmx.lang:+hw-transaction-started+ | |
(loop for i upto 100000 | |
collect | |
(set-it y))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment