Watch, Follow, &
Connect with Us

The Oracle at Delphi













Older Stuff



Archive for the 'Parallel Programming' Category

(Chronologically Listed)

“Talk Amongst Yourselves” #3

So far we’ve had “Testing synchronization primitives” and “Writing a ‘self-monitoring’ thread-pool.” Let’s build on those topics, and discuss what to do with exceptions that occur within a scheduled work item within a thread pool.
My view is that exceptions should be caught and held for later inspection, or re-raised at some synchronization point. What do [...]

Posted by Allen Bauer on April 7th, 2010 under Delphi, General, Parallel Programming, Work | 5 Comments »

Another installment of “Talk Amongst Yourselves”

Let’s start thinking about thread pools. How do you manage a general purpose thread pool in the face of no-so-well-written-code? For instance, a task dispatched into the thread pool never returns, effectively locking that thread from ever being recycled. How do you monitor this? How long do you wait before spooling out a new thread? [...]

Posted by Allen Bauer on March 26th, 2010 under CodeGear, Delphi, General, Parallel Programming, Work | 7 Comments »

Simple question… very hard answer… Talk amongst yourselves…

I’m going to try a completely different approach to this post. I’ll post a question and simply let the discussion ensue. I would even encourage the discussion to spill over to the public newsgroups/forums. Question for today is:
How can you effectively unit-test synchronization primitives for correctness or more generally, how would you test a concurrency [...]

Posted by Allen Bauer on March 22nd, 2010 under CodeGear, Delphi, General, Parallel Programming | 25 Comments »

Thread pools <> Task handling.

The Delphi Parallel Library (DPL) tends to occupy a lot of my otherwise idle "thought" time. DPL has been redesigned in my head more times than I can count.  The good news is that it is conceptually beginning to actually take some shape and is finding a direction.  As I’ve stated before, a lot of [...]

Posted by Allen Bauer on February 22nd, 2008 under CodeGear, Delphi, Parallel Programming | 20 Comments »

Lock my Object… Please!

Here’s a quick recap of all the DPL (Delphi Parallel Library) related posts over the last few months:
A Critical[Section] Difference: Windows XP vs. Windows VistaBreaking the rulesSimmering Unicode, bring DPL to a boil (Part 2)Simmering Unicode, bring DPL to a boilPlacing your code in the forge - Refining a techniqueWhen code lies - A better [...]

Posted by Allen Bauer on February 19th, 2008 under CodeGear, Delphi, Parallel Programming | 16 Comments »

A Critical[Section] Difference: Windows XP vs. Windows Vista

No, this isn’t one of those comparisons!  This is just something somewhat interesting about the difference in the implementation of a critical section in Windows XP vs. Windows Vista.  It seems that Windows Vista is much more resilient in how it handle’s the misuse of a critical section.  One such degenerate, blatantly obvious case of [...]

Posted by Allen Bauer on February 6th, 2008 under CodeGear, Delphi, Parallel Programming | 6 Comments »

Breaking the rules

Sometimes you just have to break the rules in order to learn something new.  It is inherent in everyone, from the first time you ignored your parents about getting burned by the hot stove, to doing 10+ over the speed limit because "you can."  Even though I mentioned in this post that you should never [...]

Posted by Allen Bauer on January 22nd, 2008 under CodeGear, Delphi, Parallel Programming | 5 Comments »

Simmering Unicode, bring DPL to a boil (Part 2)

As promised, I’ll be covering the next group of methods on the TMonitor class.  Wait, Pulse, and PulseAll.  Before I do that, I want to quickly cover the spin-lock section of the Enter method from this post.  (UPDATE: For the record, the TInterlocked class does not exist yet in any shipping VCL.  You can simply [...]

Posted by Allen Bauer on January 18th, 2008 under CodeGear, Delphi, Parallel Programming | 7 Comments »

Simmering Unicode, bring DPL to a boil

Now that most of the ingredients are in the Unicode pot, I’m going to move it to the back burner and turn it down to a low simmer.  We’ll come back to it later and give it a few stirs and make sure the seasoning is right.  Meanwhile I want to start work in the [...]

Posted by Allen Bauer on January 17th, 2008 under CodeGear, Delphi, Parallel Programming | 27 Comments »

The Life and Times of a Thread Pool

As promised in this post, I’ve uploaded a demo project to Code Central. This is an implementation of Conway’s Game of Life using a thread pool and a parallel loop. It uses a 500×500 wrapping grid in which only a portion is displayed in the UI. No calculations of the next generation are done in [...]

Posted by Allen Bauer on November 2nd, 2007 under CodeGear, Delphi, IDE, Parallel Programming, Work | 14 Comments »

Server Response from: BLOGS1