Implement a basic event loop built on LittleLock
It's not guaranteed that there will always be an event loop to run, and this implementation will serve as an incredibly basic one which does not provide any I/O, but allows the scheduler to still run. cc #9128
This commit is contained in:
parent
3ee5ef12fb
commit
64a5c3bc1e
12 changed files with 429 additions and 68 deletions
|
|
@ -377,6 +377,16 @@ rust_unlock_little_lock(lock_and_signal *lock) {
|
|||
lock->unlock();
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_wait_little_lock(lock_and_signal *lock) {
|
||||
lock->wait();
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_signal_little_lock(lock_and_signal *lock) {
|
||||
lock->signal();
|
||||
}
|
||||
|
||||
typedef void(startfn)(void*, void*);
|
||||
|
||||
class raw_thread: public rust_thread {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue