about summary refs log tree commit diff
path: root/src/rt/sync/timer.cpp
diff options
context:
space:
mode:
authorEric Reed <ecreed@cs.washington.edu>2013-08-08 18:58:18 -0700
committerEric Reed <ecreed@cs.washington.edu>2013-08-19 16:31:21 -0700
commit35e844ffc1e3c022e868817ad1c548b900db800a (patch)
tree876d39c320381af77708ceace32f55094b27384d /src/rt/sync/timer.cpp
parentd09412ab893f54ef5309cf63d17bcb6110d582b9 (diff)
downloadrust-35e844ffc1e3c022e868817ad1c548b900db800a.tar.gz
rust-35e844ffc1e3c022e868817ad1c548b900db800a.zip
Make IO thread-safe.
Each IO handle has a home event loop, which created it.
When a task wants to use an IO handle, it must first make sure it is on that home event loop.
It uses the scheduler handle in the IO handle to send itself there before starting the IO action.
Once the IO action completes, the task restores its previous home state.
If it is an AnySched task, then it will be executed on the new scheduler.
If it has a normal home, then it will return there before executing any more code after the IO action.
Diffstat (limited to 'src/rt/sync/timer.cpp')
0 files changed, 0 insertions, 0 deletions