sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35093
Re: [Question #272154]: [1.1.0] Is there a way to integrate a (background) observer with wheel()?
Question #272154 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272154
Glowing Crystalline Entity posted a new comment:
I was specifically referring to this loop as "polling":
while r.isObserving(): # until observing is stopped
wheel(WHEEL_UP, 10) # wheel (might be WHEEL_DOWN on Windows)
wait(1)
In this context, it's fine as it is (and indeed, your suggestion above
has been working well for me :) ), but when I can, I try to do multi-
threaded coding in such a way that I don't have to "ask" another thread
whether it's done, but rather am notified ("interrupted") when it is.
Sometimes that resolves to some lower-level polling anyway, depending on
the architecture available, sometimes not. It can also have other
difficulties, again depending on the architecture and the specific
facilities available. It's also a little bit academic for the moment.
;-)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.