Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yeah, that should be a CompleteableFuture<ScheduledExecutorService>,
Asynchronous stuff in Java is still kinda a mess, and always will be tbh. CompleteableFuture made it kinda sane in Java 8, more modern frameworks like Reactor make it much better, but it's never going to fit with the language very well unless they make some reasonably fundamental changes. -
@netikras Oh bugger me, that makes no sense. Completely missed the point of that.
Excuse me while I sleep off my embarrassment. -
@IntrusionCM Nothing, I think they're a great addition (or will be, when they roll out.) Not sure I'd call them asynchronous though - they're more like very lightweight threads with negligible context switching overhead. In many cases they'll replace the need for asynchronous stuff in Java, but not all.
Related Rants
/** Null until this web socket is connected. Used for writes, pings, and close timeouts. */
private ScheduledExecutorService executor;
Dear boys and girls.
If you ever do this again and release this as a public library (even better - an official client of your solution, e.g. kuber-fucking-netes), I will get my way into dR's gateway servers, trace down your IP in nginx's logs, find your location, probably use some means to get your first and last name (you prolly have a domain registered under your IP anyways...), buy a ticket to your town, get to your home and wait for night to fall. Once it's dark and you're asleep, I'll make sure to leave a real nice, warm and extraordinarily smelly turd on your doorstep (I'll also make sure the process of manufacturing that gem is as noisy as it gets - you just have to bend the right way, and....).
Gents. If you really, REALLY want to make writes asynchronous, at least provide a way to either get a notification once the write is synchronized, or allow the user to handle the threads/executors himself!
https://youtube.com/watch/...
rant
asynchronous writes
kubernetes
race condition
official client
no synchronization