Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Error #107

Open
ipsBruno opened this issue Feb 20, 2018 · 1 comment
Open

Runtime Error #107

ipsBruno opened this issue Feb 20, 2018 · 1 comment

Comments

@ipsBruno
Copy link

ipsBruno commented Feb 20, 2018

Hello ...

I have this code

class mouseevent(PyMouseEvent):
        def __init__(self):
            PyMouseEvent.__init__(self)
        
        def move(self, x, y):
            global lastKey 
            lastKey = time.time()





class keyevent(PyKeyboardEvent):
        def __init__(self):                      
            super(keyevent, self).__init__()
        def tap(self, keycode, character, press):
            global lastKey 
            lastKey = time.time()


keyHandlerThread = keyevent()
mouseHandlerThread = mouseevent()
keyHandlerThread.start()
mouseHandlerThread.run()

Works fine!

But on close application i get:
Runtime Error: R6031

Apparently the threads are not killed. Someone with this problem?

Thanks in advance

@mondeja
Copy link

mondeja commented Jul 20, 2018

You should start and stop event threads with run() and stop() methods, or call thread.join() after start() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants