perf: quicker check for []

This commit is contained in:
Simon Cruanes 2024-02-14 20:53:17 -05:00
parent e0f5b5bbcb
commit 6bf58e3e62
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -47,7 +47,7 @@ module Action_queue = struct
while while
let old = Atomic.get self.q in let old = Atomic.get self.q in
if Atomic.compare_and_set self.q old (a :: old) then ( if Atomic.compare_and_set self.q old (a :: old) then (
is_first := old = []; is_first := old == [];
false false
) else ) else
true true