Skip to content

Commit 0a94086

Browse files
authoredOct 7, 2020
Change some comments
1 parent 7d48032 commit 0a94086

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎include/tc3manager.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ private slots:
116116
htype mhandle_;
117117
htype mhandleMem_;
118118

119-
// because we can not use this in ads callbacks,
120-
// we needs a different way to link a manager to some id,
121-
// ads only allows integers as userdata, so we can't simply use the pointer
119+
// We can not use "this" in an ADS callbacks on 64-Bit systems.
120+
// hence, we need a different way to reference to managers in callbacks.
121+
// ADS only allows integers as userdata, so we can't simply use the pointer
122122
// on a manager as userdata if we want this to work on 64 bit systems.
123-
// Hence, we give each manager a unique (32bit id) such that we can identify it later
123+
// We give each manager a unique (32bit id) such that we can identify it in a callback.
124+
// Unfortunately, this make the constructor not threadsafe, should not be a big issue
125+
// though, because managers should not be created too much dynamically in most use cases
124126
utype id_;
125127
static utype nid_;
126128
static QHash<utype, Tc3Manager*> uniqueInst_;

0 commit comments

Comments
 (0)
Please sign in to comment.