Skip to main content

Posts

Showing posts with the label asynchronous programming

Async (Non-blocking) programming with Java

Following on from my last post, where i explore doing Async with C++0x, in this one i try to accomplish the exact same thing with Java. So first of all, before i say anything else, to me Java is first love and to some extent I still love the idea of writing anything in Java. However there are things that i have come to appreciate in other languages such as C++. So in case you are wondering, why the disclaimer? well when trying to do some Async stuff with Java, i found it to be a bit more complicated then what it was in C++. I honestly never ever imagined myself saying this, but yes it is true, i tried really hard to blame it on the tutorials that i found or my own thinking, but i must accept it for what it is. Problem Given how boring my problem definition was in the last post, i will try to make this more exciting in this one. So say, we have a shop and we are counting the cash at the end of the day to know how much we earned. A colleague will provide some help, by counting t...

Async (non-blocking) programming with C++11

  Asynchronous  programming is a wonderfull thing is it not? However that only applies if it is used in a controlled manner. Given the advantages that it offers it can potentially be very easy to get into the swing of it all and make an entire application async and ending up in debugging hell in the event of unexpected application behaviour. So why am i talking about aync? ok so let me get one thing clear, when i say async i strictly mean non-blocking, because you can make an async call and have your program wait on the function to finish doing its task, however in that case  you are no longer doing what you set out to do.  Ok i guess  am just dragging this out, well i get the point , enough foreplay, now on to business! Since my research work is mostly all C++, i reached a stage in my research where i had to adopt an asynchronous (non-blocking) approach at solving one of my research problems. Which had me to go on the hunt for the best possible ...