I have a GUI application, which listens to a network port from a second thread. I was looking at OpenMP and I was wondering if there are easy ways to create threads like this. I was searching for documentation, but the OpenMP site is not very convenient to navigate. Could someone help?
+2
A:
As far as I understand OpenMP is a compiler-assisted parallelizing framework/library targeted to heavy computations. You hint the compiler which parts of your code (usually loops) can run in parallel. The compiler does its magic (inserting library calls, sharing/unsharing variables, etc.) and, poof, the program can now run faster (sometimes) on several cores. It might be possible to do what you want with OpenMP, I don't know, but I think you are looking at the wrong tool. Doing things directly with pthreads is one alternative.
Nikolai N Fetissov
2009-05-27 17:19:38
I already have a mechanism in place for the thread. I wanted to know if I could do it in an easier way with OpenMP. But OpenMP wasn't designed for this kind of requirements, it is meant to optimize only processing operations. Thanks a lot for the answer, Nikolai. I guess I'm pretty clear now
Sahasranaman MS
2009-05-28 03:54:54