Tuesday, August 21, 2007

Comments? First!

This is way, way off topic, but too good not to be shared. If you've ever happened to pass by the "comments" section of any popular webmag, blog or website; I'm sure you'll drop off your chair in a psychotic laughing spree at this one.

http://gizmodo.com/gadgets/announcements/gizmodo-commentards-before-the-iron-banhammer-dropped-290881.php

Monday, August 20, 2007

OCPPUG: Oslo C++ User Group

A couple of weeks ago I bumped into Tandberg's Olve Maudal, at a pub crawl organized biweekly by Oslo's Java community. I'm not much of a Java programmer (I kinda left that language behind when my college days were over), but nonetheless there are usually some very bright people at those gatherings, so I joined -- if for nothing else; to suck up some ideas. I was surprised when I at my first attendance saw a few fellow C++ programmers, hugging the Stroustrup Bible (tm).

Long story short, Olve suggested that we should try to get a regular meetup running for Oslo's C++ programmers. Neither of us had heard of such a thing before -- probably due to a lack of focus on C++ as a whole, outside of companies such as Tandberg, Funcom, Opera and a couple of others. If you compare the C++ society to that of .NET (www.nnug.no) or Java (www.java.no) .. well .. there doesn't seem to be one. As it turns out, Olve is a very dedicated guy, and as far as I can tell, the right person for the job of gathering us all.

A couple of weeks down the road, we're well into a small-but-potent collection of local C++ developers, and planning a first meet with a few tech talks, good beer and the usual plotting of world domination. I've promised to do a brief bit on threading in C++ vs. C++0x, and I'm quite excited about that.

Should anyone from Oslo (or the immediate surroundings) be reading this; there will hopefully be more meets to come, and you'll all be invited to join us. I'll cover it here as it progresses.

Wednesday, August 1, 2007

New ThreadSynch released, now with asynchronous call support

As part of a series of tune-ups, bug-fixes and feature additions in the ThreadSynch library, I've made a fresh release available at googlecode.com. The 0.8.0 source contains support for asynchronous completion of cross thread calls, with return value assignment to "Future"-objects (and the same exception-rethrowing as before). See the change log included in the source package for more information.

I have yet to update the CodeProject article, which serves as somewhat of an "how to", but that will be done within a few days.

While I consider 0.8.0 to be pretty stable, there's still work waiting to be done on the asynchronous interfaces. I will attempt to keep breaking changes at a minimum, but I believe heavy use will uncover smoother ways of dealing with call completion guarantees. With the current mechanics, an asynchronous call waiting to begin can be aborted through calling a function on the future-object, or letting the future-object fall out of scope. If the abort function is called after execution has begun, it will not return until it has completed (in other words: it won't be aborted). If exceptions are thrown during the execution, they will be re-thrown from the abort-function (or alternatively getReturnValue). Should the future object fall out of scope, the destructor will wait for a begun call to complete, or abort a call waiting to begin, but not re-throw any exceptions should one be caught in the target thread. This approach seems reasonable, but it's not perfect, so I'll have to spend more time looking into that later. I think I'll cover the problem more extensively in the upcoming codeproject article as well, so if you're interested; turn to that. In the mean-time, see the examples included in the source package.