views:

215

answers:

3

Hi, I'm looking for some threading framework to avoid writing it from scratches. Especially the tasks queuing and synchronization are what I need. I know OmniThreadLibrary which is great but is not compatible with D7. Any recommendations?

+4  A: 

So you want to stay with Delphi 7, and you want a good thread library, but don't want to write it from scratch.

One day you will upgrade, I'm sure. So why go for a poor threading library that you'll need to change when you do.

My recommendation would be to take OmniThreadLibrary, and try to port it to work with Delphi 7. Then you'll have an upgrade path.

Otherwise, try one of the recommendations in: How Do I Choose Between the Various Ways to do Threading in Delphi?

lkessler
The decision to stay with D7 or not is not up to me, unfortunately :( Otherwise I'd have upgraded to Unicode, generics-enabled version like D2010 :)Anyway thanks for the link, I must have missed it for unknown reason.
migajek
+2  A: 

I'm not trolling when I say this, but how about TThread? Although not a framework, it certainly makes working with Windows threading far less painful. Seriously, it is very well done.

Here are some links to get you started:

Mick
+3  A: 

A threading framework could possibly save you months of work in the long run, so depending on how important it is for you to have one, maybe you can use this as a reason to upgrade. And anyone who suggests that TThread and other Windows synchronisation primitives are all you need obviously has not written much threaded code. I estimate that I have spent at least 3-6 months just to develop my own threading framework to make things easier, and it has easily "paid" for itself.

Misha
"And anyone who suggests that TThread and other Windows synchronisation primitives are all you need obviously has not written much threaded code." True, that's like asking why the VCL is needed when everything can easily be done using WIN32 API calls.
mghie
The question is not only if windows base apis are sufficient, the question is also if you can see a thread framework separately from the application framework for the class of apps you target. I have some doubts about that.
Marco van de Voort
IMHO, the threading framework should be an integral part of the application framework. I target service-type applications/systems which are almost by defintion multi-threaded/distributed systems, so my threading framework and my communications framework are tightly integrated together such that passing messages between threads is identical to passing messages between applications.
Misha