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

Pass on simulation of events #475

Open
tinchodias opened this issue Mar 12, 2024 · 3 comments
Open

Pass on simulation of events #475

tinchodias opened this issue Mar 12, 2024 · 3 comments

Comments

@tinchodias
Copy link
Collaborator

I take as starting point this method:

BlSpace class >> simulateEvents: aCollectionOfEvents on: anElement [

Points to analyze/discuss:

  • Do not support simulation of events on an element that has no space; it's an unrealistic scenario
  • Remove aSpace dispatchEvent: BlSpaceEventsProcessedEvent new. The space's phase doesn't do it like that.
  • we may prefer to replace aSpace dispatchEvent: anEvent by aSpace hostSpace enqueueEvent: anEvent to emulate what BlOSWindowEventHandler or BlMorphicEventHandler do.
  • Do we need to send so many pulses? could we expect that the sender of simulate* at the end uses "pulseUntil*" to wait the events to be processes by the host loop?
@tinchodias
Copy link
Collaborator Author

tinchodias commented Mar 13, 2024

In addition, if this method makes sense:

BlSpace
	pulseUntilEmptyTaskQueue: aSpace
	timeout: 200 milliSeconds

then we might move it to instance side:

aSpace pulseUntilEmptyTaskQueueTimeout: 200 milliSeconds

@tinchodias
Copy link
Collaborator Author

tinchodias commented Mar 13, 2024

Also, BlSpace class>>#pulseUntilEmptyTaskQueue:timeout: should wait if aSpace universe hasDeferredActions


EDIT: This was fixed in #478

@tinchodias
Copy link
Collaborator Author

This pass might open the door to remove BlUseAsyncFeatures which is now only used by Scripter's strategies (sync and async).

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

1 participant