condition-variable-225x225

Condition Variable Class in C++

Condition variables are used in conjunction with mutexes by one thread to signal other threads that it has changed the state of a given variable. Synchronizing threads with the standard Pthreads functions is straightforward, but wrapping these calls in C++ classes makes them all the easier to use. In my last article I showed you…

mutex-lock-225x225

Mutex Class in C++

When multiple threads want to synchronize access to a shared resource they use mutexes and condition variables. A mutex enables a thread to block other threads from accessing a shared resource, while a condition variable is used by a thread to make itself wait for the state of a resource to be changed by other…

multithreaded-225x225

Multithreaded Work Queue Based Server in C++

Creating a multithreaded TCP/IP protocol based server requires the capabilities to handle network communication, multithreading and transferring data between threads. I have described how to build C++ components to handle this functionality in previous blogs. This time I’ll show you how to combine these components to create a simple multithreaded server.   Background Articles The…

xml-java-225x225

XML Parsing with DOM in Java

In my blog XML Parsing With DOM in C++, I used the Xerces-C++ XML Parser as the foundation for the XML parsing API. The classes from that article are also useful for and can be implemented in Java. The difference is Java includes support for XML parsing with both the SAX and DOM models. You can read up…

network-socket-225x225

TCP/IP Network Programming Design Patterns in C++

Network programming with the BSD Sockets API involves making a series of boilerplate calls to several operating system level functions every time you want to create connections and transfer data over TCP/IP networks. This process can be both cumbersome and error prone. Fortunately there is an easier way to develop network applications. By thinking in…