kalevik Posted April 9, 2015 Report Share Posted April 9, 2015 HiI am writing user interface with several buttons and labels. This interface is running its own thread.I have 4 other threads which are reading/writing data from serial ports. Depending on this data, buttons must enabled/disabled and label's text changed. Each thread controls only its 'own' widgets.Is gwin-api (gwinSetEnabled, gwinSetText etc) thread safe?If not, what is the right way control widgets from different threads?Os is chibios.regardskalevik Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted April 9, 2015 Report Share Posted April 9, 2015 Hello kalevik and welcome to the uGFX community!All the GWIN API is thread safe. Most libraries have really big problems when it comes to multi-thread drawing. However, uGFX is one of the few that has no issues at all with that. You can draw from as many threads as you want. The only thing where uGFX is not multi-thread safe is the GFILE module.~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now