#tde-devs < 2022/12/31 >
[11:32]|akh|: Am I correct that e.g. TQPtrList::next() is not multi-thread safe? i.e. only one iterator on such a list can be active at the same time?
[12:03]denk: it should be thread safe
[12:03]denk: https://trinitydesktop.org/docs/qt3/ntqptrlist.html
[12:03]denk: Inherits TQPtrCollection.
[12:03]denk: All the functions in this class are reentrant when TQt is built with thread support.
[12:11]|akh|: Am I correct though that there's only one current item pointer maintained per list? IOW, there's no magic going on under the hood to give each thread its own current item pointer.
[12:15]denk: I guess the iterator is a separated object which independens on each others, the list is thread sate itself, but the pointers to your data are not (or depend on you)
[12:18]|akh|: Got it. If one uses an explicit iterator then each thread maintains its own current poiunter; if using first() next(), etc. the pointer is shared amongst all threads
[12:18]|akh|: thnx
[12:23]denk: nice, it means I remember correctly the qt3 code :)
[12:26]|akh|: :^)