Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Explanation/Examples for TThreadMode Subscriptions #75

Open
luebbe opened this issue Apr 6, 2022 · 1 comment
Open

Question: Explanation/Examples for TThreadMode Subscriptions #75

luebbe opened this issue Apr 6, 2022 · 1 comment

Comments

@luebbe
Copy link
Contributor

luebbe commented Apr 6, 2022

Hi Folks,

I'm just starting to use delphi-event-bus and I'd like to have some more information on the subscription types, like typical use cases and when to use which subscription method.
I assume, but I'm not 100% sure:

  • TThreadMode.Posting is the default when no type is given in the subscribe attribute
  • TThreadMode.Main should be used, when the consumed event results in an ui update
  • If an event is produced and consumed in the UI, Posting is equvalent to Main

What about the others?

@SwiftExpat
Copy link
Contributor

@luebbe
I would not consider this guidelines, but it might help you experiment.

To figure out my own issues I wrote a FMX demo app here my fork, deb overflow which simulates a "busy app", multiple threads producing events and slowly processing the events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants