Read this guy’s notes. Seriously. Working out my own threading issues for STDJ’s purposes, I either came to the same conclusions, or should have. Even though it’s “old skool MFC”, it has great advice that can be abstracted and applied to any multithreaded environment. I’m keeping a backup of that page.

My initial troubles came from trying to decipher the MSDN docs on how to start/end a thread. There are at least FOUR #*&@% different ways to do it, and the docs are so bad they will make you go blind if you read them all. After digging for a while, the guy at flounder.com has it right when he says only one is correct. A quick peek at the Shareaza code base shows that they agree. Upwards and onwards with AfxBeginThread()!

Other issues that he helped me with were using the volatile keyword on shared (and properly locked) variables, and using ::PostMessage, not ::SendMessage, from thread to thread (I should have figured that one out, sigh…).

If I get enough time I am hopeful about switching to boost’s thread library in the future.

Two-second text rendering tutorial: (continued…)

I cranked this out in OpenOffice “in like 2 minutes”, to quote Napolean Dynamite…



TDM Home Network

I’m loving using Gallery for serving up my photos, I can keep them on my own machine and avoid feeling like a Flickr whore. Of course that means I have to provide the bandwidth! But these are personal, and I love to own my own data, so it feels right.

For a full install on Gentoo, just emerge:

emerge gallery

Under Fedora, you have to grab each module separately – here are the ones I chose to grab:

yum install gallery2 gallery2-albumselect gallery2-classic gallery2-ffmpeg gallery2-floatrix gallery2-gd gallery2-hybrid gallery2-icons gallery2-imageblock gallery2-imagemagick gallery2-linkitem gallery2-matrix gallery2-newitems gallery2-randomhighlight gallery2-rating gallery2-remote gallery2-reupload gallery2-rewrite gallery2-rss gallery2-search gallery2-siriux gallery2-sitemap gallery2-sizelimit gallery2-slider gallery2-slideshow gallery2-slideshowapplet gallery2-squarethumb gallery2-thumbnail gallery2-thumbpage gallery2-tile gallery2-useralbum

Then you create a database for gallery, set up apache, and browse to the base directory to go through the install. The only strange thing is that under Fedora the default is for the data to go under /srv/gallery2/g2data, since /usr/share is read-only by default. So that’s where I put it. Have fun!

Here are my notes on installing the AMD64 build of Gentoo on my EPoX 9NPA+SLI with an Athlon 64 3000+. It’s my primary Windoze box, for development and gaming, but it’s now being dual-booted as a testbed for a future MythTV-based media center… hopefully IN TIME FOR THE WORLD CUP! 😛 (continued…)