priestd09 / wxanythread Goto Github PK
View Code? Open in Web Editor NEWThis project forked from yoriz/wxanythread
allow wxPython function/method calls from any thread
License: MIT License
This project forked from yoriz/wxanythread
allow wxPython function/method calls from any thread
License: MIT License
wxAnyThread: allow methods on wxPython objects to be called from any thread In wxPython, methods that alter the state of the GUI are only safe to call from the thread running the main event loop. Other threads must typically post events to the GUI thread instead of invoking methods directly. While there are builtin shortcuts for this (e.g. wx.CallAfter) they do not capture the full semantics of a function call. This module provides an easy way to invoke methods from any thread *transparently*, propagating return values and exceptions back to the calling thread. The main interface is a decorator named "anythread", which can be applied to methods to make them safe to call from any thread, like so: class MyFrame(wx.Frame): @anythread def GetSomeData(): dlg = MyQueryDialog(self,"Enter some data") if dlg.ShowModal() == wx.ID_OK: resp = dlg.GetResponse() return int(resp) else: raise NoDataEnteredError() The GetSomeData method can now be directly invoked from any thread. The calling thread will block while the main GUI thread shows the dialog, and will then receive a return value or exception as appropriate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.