Introduction to lock free programming - or how to use QAtomic classes

ogoffart's picture

Olivier Goffart
Woboq GmbH
Europe Date: 
Wednesday, October 8, 2014 -
9:00am to 10:00am
Europe Room: 
B7+B8
Europe Track: 
Europe Presentation PDF: 

Presenter Bio: 

Olivier Goffart started working with Qt 10 years ago with his involvement in KDE.
He was then hired by Trolltech to work on Qt in 2007.
He has been working on various areas of Qt including the itemview framework, the widget stylesheets, QtScript,
the QObject internals, and the QML debugger for Creator.
He is now the co-founder of Woboq, a company based in Berlin focusing on Qt.

Abstract: 

Lock free programming is the art of programming with threads without using any locks or mutexes to synchronize your data. Instead, one can use atomic operations. Qt has had classes to do atomic operations for a long time: the QAtomicInteger and QAtomicPointer classes. This talk will introduce to the joys and challenges of lock free programming. We will review memory ordering considerations and the C++11 memory model. We will design a simple lock free linked list, and go over some examples of lock free code you can find in the code of Qt itself such as the reference counting, the timer allocation and the mutex implementation. This talk is technical and requires basic knowledge of multi-threading but does not require prior Qt knowledge.