Threading an event and actor system

Started by
9 comments, last by 3DModelerMan 12 years, 11 months ago

[quote name='Endar' timestamp='1305970231' post='4813796']
Unless your goal is to learn. If your goal is functionality, then yeah, you might as well go for the boost libraries, but if you want to learn more about threading, then write your own. There's no reason as to why you couldn't move from your own back to boost after it's complete. But if you want to learn as much as you can, writing your own, at least for the initial stage, may be better than going directly for third party libs.


You don't learn anything this way.

Abstracting away individual threading APIs doesn't teach anything. It's a mundane tedious work on a completely solved problem. Especially considering boost::thread is what will now become std::thread, a part of standard library.

Writing wrappers not only does not teach anything about multithreading, it will leave you oblivious to a million tiny details that are involved in such work and which has taken hundreds of seasoned veterans to slowly work out all the kinks.

Even more - someone who wants to do anything useful and learn anything meaningful, the following APIs are a must to learn:
- POSIX pthreads (the linux/unix way)
- WinAPI threads (Windows alternative)
- OpenMP (not ideal, but closest to standard)

For C++, boost's threads are the C++ wrapper over POSIX-like functionality, taking into account certain restrictions of both the target platforms as well hardware and language limitations.

Individual industries may use others as well, either specific libraries or variations on the theme above: TBB is one example of such specific library.
[/quote]




I'm going to use boost. I don't really care about the details of the API calls, that's just syntax differences. I'm just going to use boost so that I can get used to locks and mutexes and critical section, and all the threading concepts that you don't have to think about when working single threaded.


This topic is closed to new replies.

Advertisement