class CPitBoss |
Maintain global data structures, accessible to all Workers to which the PitBoss pointer is published (through the TWorkerMainIntroductionMsg). Mostly the workers will access this data using PitBoss access functions which are thread-safe, taking special measures to guarantee this where needed.
Manage Worker thread start and death: Registering Workers and installing protocols when they start and do a best effort cleanup if they die due to some error condition.
Apart from these, the PitBoss also provides some minor but important services. For example as all ESock instances can have their own heap sometimes it happens that one Worker needs to do something that might cause allocation or freeing on another workers heap, such as inserting a sub-session into a Dealers session. So the PitBoss offer a function that can determine whether a different heap is needed (maybe the two workers have different heaps, maybe they share one heap) and does the switch. It also has AddSubSession() and RemoveSubSession() methods used by the Player, assuring this happens on the right heap for operations like Socket Transfers.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.