Today I finally happened to watch Season 2 finale of suits.. and Boy/Girl! it will just throw you off. Finally Harvey Specters love life is kicking off and Mike`s secret is been gorged out to Rachel. And No! I am not apologizing for spoiler alert :P
But that just aint it. The finale episode has some excellent soundtracks, which I just cant stop listening to over and over and over again. Suits is one of those classic serials where you get to listen some amazing not-so-popular sound tracks.
The Sunset song by XX is heaven to my ears. Just amazing... Also, Breaking The Silence by Midnight Flowers. I just to listen to a couple of songs of this band before , but never happened to listen this.
I ll keep adding more songs from Suits as and when I find.
Finally I realized the importance of blogging. (Yeah... I m a tubelight, but Hey .. tubelight is brighter than a bulb). So how come such a late realization ? After such a long time , I encountered my old friend C++, yeah and was a very nasty encounter.
Well if you have read dilbert comic strips, you would definitely realized by now, that if you dont work on a particular programming language for more than 6 months, then you are as amateur as a school grad. Actually school grads will perform better. Anyways, the problem I came across was I needed to refactor, rather fix some part of the program which was initially written in a very sequential manner and needed to be scaled. After much hype of nodejs and similar frameworks on Async programming, I thought why not try Boost ASIO. Mind you this is not for the feint heart.
So here is what I do. Here is an excellent ppt . It relatively easier if you have prior background on Async programming. Time to test some sample programs in it.
It compiles and executes. You will see that statement after 5 seconds. So, whats the BIG DEAL ?By calling the method async_wait() and passing the name of the handler()function as the single argument, you have actually initiated a asynchronous operation. As of now, the name of the function is passed on async_wait and function call is not yet made. As soon as the time goes off(5 seconds in this case), the function is then executed.
The run() in io_service ensures the main program doest terminate, thus giving back control to OS. Also, you can create mutiple handlers for the same io_service or can mutiplex it ( more on that later..)