Friday, July 23, 2010

So terribly sorry …

Writing code ain’t that hard a job.

Writing correct code, well that’s a much harder venture.

And what can I say about writing correct multithreaded code? Only that it’s close to impossible.

That’s exactly why I started writing OmniThreadLibrary – I needed well-tested framework for multithreading processing.

But alas! there are bugs in OmniThreadLibrary too. Not many of them, true, but still they are there. Some are squashed soon, other remain hidden for a long time.

I found one such bug few days ago when I was searching for a reason why some code doesn’t parallelize well. In theory the speedup should be close to 8x (on a 8 core machine) but in practice the parallel code was only faster by a factor of 2 to 3.

At the end of a long day I found out a bug in the TOmniBlockingCollection that prevented all threads to be executing at once. Only two or three threads were really working and they did all the job – but only two to three times faster, of course.

The bug is now fixed in the trunk. Anybody can do a checkout and get a perfect (well, maybe not perfect but definitely a better-working) code.

Because this was quite an important fix I’ve also incorporated it into the 1.05 version of this unit. You can download it here. If you’re using 1.05 and TOmniBlockingCollection, you surely want to download the update.

I’m really sorry for letting this stupid bug slip through my testing. Won’t happen again. (Or maybe it will. Probably it will. Oh, heck, it surely will. I’ll just try to make such problems very rare. Promise.)


  1. Anonymous21:51

    lol, thank you. You are doing a fantastic job already.

  2. all software has bugs; the difference between good coders and bad coders is the good coders fix their bugs. thank you for the continued releases.

  3. Anonymous22:27

    Don't apologies ! You are making a wonderfull job !!!

  4. Anonymous22:41

    Your honesty & tranparency is appreaciated and all that we should expect. :)

  5. Anonymous06:06

    Heck, my bugs have bugs :-)

  6. Hi gabr, get over it! shiet happends(it's not the end of the world), we all know that :)
    Have a fantastic weekend!!

  7. Derek Hadlington22:56

    My Bugs have Bugs too :)
    Seriously Gabr Wonderful Job.
    Ive tried the library in past and its great !

    Sadly I wont be using it now as Ive made a decision to move away from Delphi Completely for reasons I wont go into here :)

    I will be using the ConCRT in Visual Studio 2010 which is also Cool if you havent seen it.

  8. Thanks for pursuit the excellence in your open source projects, and special thanks for maintaining 1.05!

  9. Chee Meng15:27

    gabr, you frightened me with the blogpost title! LoL!
    Did not check my feedreader for a few days and bam! gabr saying apologising? Is he gonna discontinue his framework? LoL

  10. Chee Meng15:28

    *ooops* remove the word "saying" from my comment. See? My comments have bugs too! LoL

  11. Keith Tolbert17:40

    Greetings Primoz,

    I caught your webinar yesterday and it was fantastic. I am REALLY looking forward to using your OTL.

    I agree with the webinar student who said your OTL should be part of the VCL.

    Thank you so much for all your hard work!