[Qt-interest] concurrent-run of a static function
Gabriele Kahlout
gabriele at mysimpatico.com
Sun May 16 19:36:24 CEST 2010
Sorry, for trouble caused by the signature. I said I didn't write it with
mailing lists in mind. However i'll not lengthen it to include a 'mailing
list' note too. Applying it in a mailing list would mean that someone with
qt-interest at trolltech.com replies (In(senderAddress(x), MySafeSenderList)),
which is impossible ( --> _|_ ).
However, I fell back to my tendency to email back, a follow up in 48h. Sorry
=)
Also note the 'might' (⇒ ¬) in it, indicating the case where I don't resend.
However I may still not resend (not <-->), as I'll try to exercise here.
Back to the question:
I was referring to:
// call 'void QImage::invertPixels(InvertMode mode)' in a separate thread
QImage image = ...;
QFuture<void> future = QtConcurrent::run(image,
&QImage::invertPixels, QImage::InvertRgba);
...
future.waitForFinished();
// At this point, the pixels in 'image' have been inverted
I tried several modifications to use a static function in palce of the
invertPixels, but failed. Since the doc doesn't explicit that one cannot use
static functions, I wondered. BTW the class is a singleton, so I may not use
an instance to call the static method.
Related to your concurrency claim (in 2 sockets x thread thread), what I
want to do should be equivalent, to having the function as a slot (and no
more singleton) and connect a signal to it. Isn't it?
--
Regards,
K. Gabriele
--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer OR with
" ACK" appended to this subject within 48 hours. Otherwise, I might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x, this)
∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).
Also note that correspondence may be received only from specified a priori
senders, or if the subject of this email ends with a code, eg. -LICHT01X,
then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y. In(y,
subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100516/ed201fb3/attachment.html
More information about the Qt-interest-old
mailing list