make sure that our promise callbacks run in a runloop

RESOLVED INVALID

Status

P1
normal
RESOLVED INVALID
9 years ago
9 years ago

People

(Reporter: dangoor, Unassigned)

Tracking

Details

(Reporter)

Description

9 years ago
Right now, it's very easy to forget to wrap async results in a runloop to allow 
the UI and properties to get updated properly. Since we use promises 
consistently, if we make sure that promises callbacks execute in a runloop, we 
can eliminate that source of pain.

We should check (via SC.none(SC.RunLoop.currentRunLoop)) to see if we're in a 
runloop currently. If not, wrap the function call in an SC.run().

Once we've done this, we can remove the SC.run calls in the link() method as 
well as in several commands (just search for SC.run and see if that's happening 
in a promise callback).
(Reporter)

Updated

9 years ago
Target Milestone: 0.7.1 → ---
Is this still relevant?
(Reporter)

Comment 2

9 years ago
No, not relevant any more since the runloop was specific to SproutCore.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.