-
Recent Posts
Recent Comments
Archives
Categories
Meta
Monthly Archives: November 2013
How to avoid core dump when exiting the process in linux/unix
Sometimes in an application, we want to exit the process forcefully (no graceful termination), but do not want the core dump to be generated. One example could be a service that is being monitored by “monit” and if killed is … Continue reading
Posted in Uncategorized
Tagged application, core dump, exit, linux, multithreading, process, SIGKILL, signal, thread, unix
Leave a comment
boost multithreading and shared mutex example: multiple reader, multiple writer
Here is a simple example of boost multithreading and shared mutex. Hope it helps. The code is quite simple and self explanatory: #include <iostream> #include <boost/thread.hpp> #include <boost/date_time.hpp> boost::shared_mutex g_mutex; using namespace std; void reader(string id) { cout << id … Continue reading
Posted in Uncategorized
Tagged boost, lock, multithreading, mutex, shared_mutex, thread
Leave a comment