Add multithreading patterns #363

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
2 participants
Member

sevoku commented Jul 17, 2014

I've added some multithreading features including a "Multithreading" sample, which starts different worker patterns and invokes results in the gui thread.

XwtSynchronizationContext: is installed automatically and uses Application.Invoke for synchronization. BackgroundWorker can synchronize with the UI Thread automatically for example.

XwtComponent: implements the old fashioned ISynchronizeInvoke. Very useful when porting old WinForms Implementations to Xwt.

Possible regressions: should be tested in Guest mode

I've tested everything on Linux, Windows (Wpf and Gtk) and Mac (Cocoa and Gtk)

PS: let me know if I should split this in different PRs. The first commit simply adds the sample part without the new implementations and could be very useful for others.

sevoku added some commits Jul 17, 2014

@sevoku sevoku add sample for multithreading
with Application.Invoke and Application.UITaskScheduler
c16f62f
@sevoku sevoku add an XwtSynchronizationContext class
* uses Application.Invoke to synchronize with UIThread
* install/uninstall context automatically
84d9a7a
@sevoku sevoku add ISynchronizeInvoke implementation to XwtComponent 751ddde
@sevoku sevoku add more multithreading samples 520cdc3
@sevoku sevoku implement ISynchronizeInvoke explicit 5d5c06f
Owner

slluis commented Nov 30, 2014

Merged. Thanks!

slluis closed this Nov 30, 2014

Member

sevoku commented Jan 8, 2015

Strange, Github shows "Closed with unmerged commits", but everything seems to be merged. Github bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment