Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Almost every slightly complex piece of software will eventually require the use of threads to achieve the required goals. It could be due to performance, collaboration, polling, long execution tasks or other programming reasons. In the specific case of components, every call will run in a different thread, so the program is, by design using threads, however, there are still reasons to create new threads, for instance to schedule and execute tasks at specific times.

In principle, for clients and components, the developer is free to use the threading mechanism they prefer. In particular, for portability, ACS provides managed threading facilities to control C++ threads lifecycle, which could be used by clients and components. A second benefit of using managed threads in containers, is that the created threads will get destroyed along with the termination of the component or the container itself, ensuring proper release of resources if, for any reason, they were not manually released before.

The ACS Threads were created before C++ supported threads, hence it is based in ACE/TAO's spawn function, which, for Linux (and other OSs), is based on pthread. Considering that C++ is now offering a proper threading standard it makes sense to move forward in this direction. This would also allow to provide a leaner interface to make developers life easier.

Presentation

  • Scope
    • Threading in the different programming languages
    • ACS Managed Threading in C++
  • Duration: 15 minutes

...

  • Dependency with ACE/TAO spawn / pthread
  • Upgrading C++ Threading Technology (std::thread)
  • Managed Threading for other languages