| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6fdc502 commit 30f0a3b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -96,13 +96,6 @@ class DispatchMessagesTask : public v8::Task { | |||
| 96 | 96 | MainThreadInterface* thread_; | |
| 97 | 97 | }; | |
| 98 | 98 | ||
| 99 | - void DisposePairCallback(uv_handle_t* ref) { | ||
| 100 | - using AsyncAndInterface = std::pair<uv_async_t, MainThreadInterface*>; | ||
| 101 | - AsyncAndInterface* pair = node::ContainerOf( | ||
| 102 | - &AsyncAndInterface::first, reinterpret_cast<uv_async_t*>(ref)); | ||
| 103 | - delete pair; | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | 99 | template <typename T> | |
| 107 | 100 | class AnotherThreadObjectReference { | |
| 108 | 101 | public: | |
@@ -231,18 +224,6 @@ MainThreadInterface::~MainThreadInterface() { | |||
| 231 | 224 | handle_->Reset(); | |
| 232 | 225 | } | |
| 233 | 226 | ||
| 234 | - // static | ||
| 235 | - void MainThreadInterface::DispatchMessagesAsyncCallback(uv_async_t* async) { | ||
| 236 | - AsyncAndInterface* asyncAndInterface = | ||
| 237 | - node::ContainerOf(&AsyncAndInterface::first, async); | ||
| 238 | - asyncAndInterface->second->DispatchMessages(); | ||
| 239 | - } | ||
| 240 | - | ||
| 241 | - // static | ||
| 242 | - void MainThreadInterface::CloseAsync(AsyncAndInterface* pair) { | ||
| 243 | - uv_close(reinterpret_cast<uv_handle_t*>(&pair->first), DisposePairCallback); | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | 227 | void MainThreadInterface::Post(std::unique_ptr<Request> request) { | |
| 247 | 228 | Mutex::ScopedLock scoped_lock(requests_lock_); | |
| 248 | 229 | bool needs_notify = requests_.empty(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -89,11 +89,6 @@ class MainThreadInterface { | |||
| 89 | 89 | void RemoveObject(int handle); | |
| 90 | 90 | ||
| 91 | 91 | private: | |
| 92 | - using AsyncAndInterface = std::pair<uv_async_t, MainThreadInterface*>; | ||
| 93 | - | ||
| 94 | - static void DispatchMessagesAsyncCallback(uv_async_t* async); | ||
| 95 | - static void CloseAsync(AsyncAndInterface*); | ||
| 96 | - | ||
| 97 | 92 | MessageQueue requests_; | |
| 98 | 93 | Mutex requests_lock_; // requests_ live across threads | |
| 99 | 94 | // This queue is to maintain the order of the messages for the cases | |
| Back | FazBrowse Home | New Git URL |
0 commit comments