Skip to content

Should fireTrigger return a generator function? #141

Open
@adroitwhiz

Description

@adroitwhiz

Right now, fireTrigger and Trigger.start return Promises. broadcastAndWait works by waiting for the Promise returned by fireTrigger to resolve, and yielding until then.

Async code has some really convoluted timing details, so it may be worth changing fireTrigger to return a generator function which waits until all started threads are done (or to just return the list of all started threads, and let broadcastAndWait do the waiting itself).

This may also be necessary to get some of Scratch's timing details correct (see also scratchfoundation/scratch-vm#1683).

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityBugs that cause Leopard's behavior to differ from Scratch'sdiscussionLooking for feedback and input

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions