Software Transactional Memory: #Clojure vs. #Haskell

New post! Comparing these was a lot of fun. Shoutout to @plexus for the inspiration with the concurrency problem.
leftfold.tech/posts/pie-a-la-m

Follow

@johnny > drop the transaction if we've had no luck for x seconds

That would be [registerDelay](hackage.haskell.org/package/ba). It's in IO, but it gives you a TVar, that will flip to True when the time comes. You can readTVar it to decide retry or bail.

Also, you can wrap pretty much anything in `timeout` (in IO proper).

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.