12 Aug 2010 redi   » (Master)

apenwarr writes:

Well, it means we're headed for trouble. Intel and other chip manufacturers are insistent that we need to update our programs - and thus our programming languages - to do more stuff with threads. Watch out, they say, because soon, there'll be no way to make your program fast unless you use multiple cores simultaneously. And that means threads, which means garbage collection instead of refcounting, which means non-deterministic destructors.

Or you stick with refcounting and deterministic destructors, and minimise data sharing between threads.

One option is to have different refcounting policies, so that some counts are not threadsafe and use simple integer increments/decrements without memory synchronisation, while counts for objects which are shared between threads use slightly slower, synchronised operations.

That can work well, although it isn't foolproof. You need to be strict about never sharing objects with unsync'd refcounts and need to know in advance whether you'll want to share an object because you can't easily convert between sync'd and unsync'd refcounts.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!