Re: [Sikuli-driver] [Question #682255]: Custom theading best practices

2019-08-20 Thread Hugo Jose Goncalves
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

Status: Answered => Open

Hugo Jose Goncalves is still having a problem:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\atexit.py",
 line 24, in _run_exitfuncs
func(*targs, **kargs)
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\threading.py",
 line 297, in _MainThread__exitfunc
t.join()
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\threading.py",
 line 137, in join
self._thread.join()
InterruptedException: java.lang.InterruptedException
Error in sys.exitfunc:
Traceback (most recent call last):
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\atexit.py",
 line 24, in _run_exitfuncs
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\threading.py",
 line 297, in _MainThread__exitfunc
  File 
"C:\Users\hugo1\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib\threading.py",
 line 137, in join
at java.lang.Object.wait(Native Method)
at java.lang.Thread.join(Unknown Source)
at java.lang.Thread.join(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.InterruptedException: java.lang.InterruptedException


I don't think it should be waiting (joinning) these custom threads as they have 
a infinite loop
that's why I thought it made a lot of sense to mark them as daemon

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #682255]: Custom theading best practices

2019-08-19 Thread Hugo Jose Goncalves
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

Hugo Jose Goncalves posted a new comment:
Oh, I don't need at all
I may have misread python docs about threading
Long time I don't use it at all.

Gonna test it tonight, sorry for bothering.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #682255]: Custom theading best practices

2019-08-05 Thread Hugo Jose Goncalves
Question #682255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/682255

Status: Answered => Open

Hugo Jose Goncalves is still having a problem:
even with build 364 daemon threads doenst get killed using alt+shift+c,
same issue if the sikulix ends due an exception

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #682255]: Custom theading best practices

2019-07-23 Thread Hugo Jose Goncalves
New question #682255 on Sikuli:
https://answers.launchpad.net/sikuli/+question/682255

Are there any recommended approach for custom threading?
I'm already using observers which work pretty well for some cenarios, but I 
want to leave a thread running some tasks until a observer gets triggered and 
stops that task.

I'm using something like this -> 
`
 myreg.onVanish(stopTask)
 myreg.observeInBackground(FOREVER)

 taskThread = threading.Thread(target = myTask, args = (taskArg, ))
 taskThread.daemon = True
 taskThread.start()

 while True:
# keep alive stuff
`

I ran into a few things like **taskThread** not getting stopped with 
**alt+shift+c** for example
I kinda managed to make it work fine using a custom stop HK.
Just wondering if there are any best practices about custom threading and 
SikuliX as I couldn't find any information.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1341044] [NEW] 1.1.0-Beta3 - Ide only works the first time (Run)

2014-07-11 Thread Hugo Jose Goncalves
Public bug reported:

Just downloaded Sikulix 1.1.0-Beta3, and tried to run a script that was working 
fine on the version 1.1.0-Beta1.
It worked as expected, but only the first time after I open the IDE. After that 
it runs the script but my hotkeys doesn't work and I can't abort using 
alt+shift+c also, forcing me to shutdown the process.

Sorry about my bad english.
If it's not clear enough let me know, so I can try to rewrite this. ;)
Keep up the good work.

I guess this is the wrong area, sorry about that ;O

** Affects: sikuli
 Importance: Undecided
 Status: New

** Description changed:

  Just downloaded Sikulix 1.1.0-Beta3, and tried to run a script that was 
working fine on the version 1.1.0-Beta1.
  It worked as expected, but only the first time after I open the IDE. After 
that it runs the script but my hotkeys doesn't work and I can't abort using 
alt+shift+c also, forcing me to shutdown the process.
  
  Sorry about my bad english.
  If it's not clear enough let me know, so I can try to rewrite this. ;)
  Keep up the good work.
+ 
+ I guess this is the wrong area, sorry about that ;O

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1341044

Title:
  1.1.0-Beta3 - Ide only works the first time (Run)

Status in Sikuli:
  New

Bug description:
  Just downloaded Sikulix 1.1.0-Beta3, and tried to run a script that was 
working fine on the version 1.1.0-Beta1.
  It worked as expected, but only the first time after I open the IDE. After 
that it runs the script but my hotkeys doesn't work and I can't abort using 
alt+shift+c also, forcing me to shutdown the process.

  Sorry about my bad english.
  If it's not clear enough let me know, so I can try to rewrite this. ;)
  Keep up the good work.

  I guess this is the wrong area, sorry about that ;O

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1341044/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp