mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-23 19:31:24 +08:00
Remove the on_watcher_queue_updated hack.
This commit is contained in:
@@ -26,23 +26,6 @@ NodeBindingsMac::NodeBindingsMac(bool is_browser)
|
||||
NodeBindingsMac::~NodeBindingsMac() {
|
||||
}
|
||||
|
||||
void NodeBindingsMac::RunMessageLoop() {
|
||||
// Get notified when libuv's watcher queue changes.
|
||||
uv_loop_->data = this;
|
||||
uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged;
|
||||
|
||||
NodeBindings::RunMessageLoop();
|
||||
}
|
||||
|
||||
// static
|
||||
void NodeBindingsMac::OnWatcherQueueChanged(uv_loop_t* loop) {
|
||||
NodeBindingsMac* self = static_cast<NodeBindingsMac*>(loop->data);
|
||||
|
||||
// We need to break the io polling in the kqueue thread when loop's watcher
|
||||
// queue changes, otherwise new events cannot be notified.
|
||||
self->WakeupEmbedThread();
|
||||
}
|
||||
|
||||
void NodeBindingsMac::PollEvents() {
|
||||
struct timespec spec;
|
||||
int timeout = uv_backend_timeout(uv_loop_);
|
||||
|
||||
@@ -15,12 +15,7 @@ class NodeBindingsMac : public NodeBindings {
|
||||
explicit NodeBindingsMac(bool is_browser);
|
||||
virtual ~NodeBindingsMac();
|
||||
|
||||
virtual void RunMessageLoop() OVERRIDE;
|
||||
|
||||
private:
|
||||
// Called when uv's watcher queue changes.
|
||||
static void OnWatcherQueueChanged(uv_loop_t* loop);
|
||||
|
||||
virtual void PollEvents() OVERRIDE;
|
||||
|
||||
// Kqueue to poll for uv's backend fd.
|
||||
|
||||
2
vendor/node
vendored
2
vendor/node
vendored
Submodule vendor/node updated: 2fce49829b...efc9599187
Reference in New Issue
Block a user