3 ms·
It is truly unfortunate that most languages lack a built-in swap instruction. Anyway, as written, your example looks like an infinite loop (Remainder Section wo
by 8chanAnon 3y ago
It is truly unfortunate that most languages lack a built-in swap instruction. Anyway, as written, your example looks like an infinite loop (Remainder Section would need to force an exit). What is the status of "lock" on entering the top of the loop? If it is "true" then this won't work (infinite loop in the while statement).