about summary refs log tree commit diff
path: root/src/rt/sync/timer.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-08-03 23:29:21 -0700
committerBrian Anderson <banderson@mozilla.com>2013-08-04 15:11:56 -0700
commita27f339cb4480e723aa7e06070683966d026d1ae (patch)
tree69284728b4a806e428443a733a88635b1215e703 /src/rt/sync/timer.cpp
parentf0f7e1b3fcfed8b77516a871ae82a4aa8df07764 (diff)
downloadrust-a27f339cb4480e723aa7e06070683966d026d1ae.tar.gz
rust-a27f339cb4480e723aa7e06070683966d026d1ae.zip
std::rt: Don't allow schedulers to exit before handling all messages
Every time run_sched_once performs a 'scheduling action' it needs to guarantee
that it runs at least one more time, so enqueue another run_sched_once callback.
The primary reason it needs to do this is because not all async callbacks
are guaranteed to run, it's only guaranteed that *a* callback will run after
enqueing one - some may get dropped.

At the moment this means we wastefully create lots of callbacks to ensure that
there will *definitely* be a callback queued up to continue running the scheduler.
The logic really needs to be tightened up here.
Diffstat (limited to 'src/rt/sync/timer.cpp')
0 files changed, 0 insertions, 0 deletions