Sunday, December 23, 2007

Pitfalls of using threads

livejournal's cpp community had a post on multi threading with c++, which got me reading on this.

The pitfalls with multi threading
- thread safe functions/non re-entrant functions
- deadlock
- race code
- pitfalls seen especially with C++ code (making initialization routines thread safe etc)

Boost.Threads (a little outdated article per the issues discussed still are a part of multithreading environment)
http://www.ddj.com/cpp/184401518

http://www.boost.org/doc/html/thread.html#id1710137

Pthreads
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

Testing and debugging is highly non-deterministic in a threaded environment, which adds to the difficulties.

Read to know more!

No comments: