@ChristopherDavenport sorry, haven’t had much time to work on this recently! What did you mean by blockage sorry? I’ve had a bit of a look into retry fairness but haven’t gotten to the bottom of it yet
PS you can see my attempted fix here: TimWSpence/cats-stm@11aef71 I might actually merge this anyway as it seems like the right thing to do - we will now retry transactions that have been waiting longer first. However it still doesn’t seem to fix the behaviour of the Santa Claus problem
Oh sorry, I just re-read your previous comment. I’ll try combining my change above with the one you suggested and see if that fixes it
The issue is that without some level of fairness, we are in a position where I cant reliably expect an action that should logically occur to happen.
As in the elves are ready but they are never happening and not because they weren’t waiting. As obviously they were done.
Thanks Ross. Yeah, just bumped the version to get rid of it :joy:
the library is interesting
do you have a java api, so that I can use the lib in kotlin or java
not everyone gets to use scala in thei job
Thanks @renghenKow_twitter The implementation is pretty tied to Scala's cats effect so I think a Java API would be tied to that as well. I'd be surprised if Cats Effect supports Java at all (no implicits or higher kinded types for a start) but @ChristopherDavenport or @rossabaker might be able to give you more details - I've never tried to use it from Java
Thanks very much for the answer
was thinking of a wrapper
like scala-stm does it
No worries! As I said, I think a wrapper would be hard because the scala features we use don't easily map to Java (as far as I'm aware anyway) but I'm very happy to consider PRs that don't break the scala UX!
Ross A. Baker
I guess if you run javap on the classes of cats-stm, you'd get some sense of how those Scala features map to Java.
I used to call Scala from Java a lot, but that was before I'd heard of higher-kinded types.
And I think the wrapper would be the most promising approach, like scala-stm's JAPI.