[Qt-interest] How to block until posted event is processed?

Mihail Naydenov mlists at ymail.com
Tue Jun 1 09:05:43 CEST 2010


Thank you for your replies. 

@Oliver: Yes I am awere of QFuture and its synchronizer, but as mentioned many times now, QFuture is completely tied to QtConcurrent and can not be used in user frameworks.

@Ross: I like your solution very much. Mainly the fact it is completely hidden from BBB - the tread receiving the WorkFinishedEvent.
However I cant use wait conditions, because it will deadlock. In my case Im waiting from BBB for AAA to finish.

What I needed was to exec the posted event synchronously...may be I phrased my post wrongfully.
This is, to be sure that when doWorkFromThreadAAA returns both the work AND WorkFinishedEvent are processed.

Anyway thanks for the hints, I m using some workarounds for my real scenario for now.

Thanks
MihailNaydenov



      



More information about the Qt-interest-old mailing list