in reply to Is GUITest SetForegroundWindow/Sendkey thread safe?
If your program calls SetForegroundWindow(), and then reaches the end of its timeslice and gets preempted; then the other program might call SetForegroundWindow before your program gets around to calling SendKeys().
With just two programs with two actions (SFW & SK) each, there are six possibilities for the ordering of those 4 actions:
A A A B B B A B B A A B B A B B A A B B A A B A
Only two will produce the desired result for both programs.
If so, what could one way be of fixing this,
The only sure way would be to wrap the two actions in a Critical Section.
This isn't (cannot easily be) available to Perl code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is GUITest SetForegroundWindow/Sendkey thread safe?
by MPQC (Initiate) on Mar 26, 2014 at 17:40 UTC | |
by BrowserUk (Patriarch) on Mar 26, 2014 at 20:47 UTC | |
by GrandFather (Saint) on Mar 26, 2014 at 20:45 UTC |