I have a server listening for messages on a port running in a different thread. Now once it receives a message I need it to be displayed in a textbox.
Is there method like runOnUiThread() (which is in android) or equivalent in Vala, GTK?
Or else what are the alternatives?
Use GLib.Idle.add to schedule something in the event dispatch thread:
Idle.add(() => {
textbox.Entry = "foo";
return Source.REMOVE;
});