Jump to content

gwin and threads


kalevik

Recommended Posts

Hi

I 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.

regards

kalevik

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...