← Back to team overview

nrtb-core team mailing list archive

[Blueprint d-tech-demos] D language technology demos

 

Blueprint changed by Rick Stovall:

Whiteboard changed:
- Started work on the thread pool/using D messages to feed pool
- demonstrator. One program will suffice for both. This will be the last
- tech demo before we start "real" alpha code.
+ Okay... so after several iterations, I've realized my C++ experience has
+ lead me down a rabbit hole for thread pool design in D. I attempted to
+ fit it all in a "template" class (like C++ ricklib), but you can not
+ spawn class methods as threads without overriding D's thread isolation
+ guarantees, which seems a pointless risk.
  
- I checked in the first attempt at a message based thread pool, but it
- has too much unintentionally shared data to be reliable. I'll be coming
- back at it with a simpler and more sophisticated design in a few days.
+ Instead, I'll define a parameterized function (a function template in
+ C++ terms) which starts the thread and registers it with with a global
+ thread pool registry. In this way other threads can find it by name when
+ they need to, and the registry class can provide a single point suitable
+ high level interface methods (submit(work), get(status), set(limits),
+ etc.). Thanks to the lockless nature of D's standard concurrency lib,
+ this should not be a bottleneck. I'll try to have the new design
+ complete by tonight's meeting.
+ 
+ More discussion/notes are available on our Gplus page:
+ https://plus.google.com/102327692340735189302/posts

-- 
D language technology demos
https://blueprints.launchpad.net/nrtb/+spec/d-tech-demos