Teaching data structures: thread safety and components
Benjamin Shults · 2003
The data structures that are written in a typical data structures course cannot or would not be used in common applications in industry for two reasons. First, they do not work according to their specifications if they are used in a multi-threaded environment. If two threads are deleting adjacent elements of a linked list at the same time, for example, then one of the deletes may not have any effect. Second, they do not fire change events and thus frustrate common design practices of connecting software components. As a result, it is more difficult for the application programmer to separate the data, the structures, the logic, the user interface, and the application code from each other. Here we discuss some issues involved in including these two topics, threads and components, in a course on data structures. Students who learn these techniques will have less to learn when they begin to use and write data structures in industry.