diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2009-11-08 16:34:12 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2010-01-03 17:17:06 +0200 |
commit | 78f8d4b9e8fdb09055c04e82e30b6a0290795339 (patch) | |
tree | aa883b71aec074544d3d56b5e0a2040d5ef1cc2e /client/windows/events_loop_p.h | |
parent | 83efc81f30b4625f40983a5771cfdccc5860f8e6 (diff) | |
download | spice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.tar.gz spice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.tar.xz spice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.zip |
spice client: creating a general process loop.
The process loop is responsible for: 1) waiting for events 2) timers 3) events queue for
actions that should be performed in the context of the thread and are pushed from other threads.
The benefits:
1) remove duplicity: till now, there was one implementaion of events loop for the channels and
another one for the main thread.
2) timers can be executed on each thread and not only on the main thread.
3) events can be pushed to each thread and not only to the main thread.
In this commit, only the main thread was modified to use the new process loop.
Diffstat (limited to 'client/windows/events_loop_p.h')
-rw-r--r-- | client/windows/events_loop_p.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/windows/events_loop_p.h b/client/windows/events_loop_p.h index 8361398d..6bac7b94 100644 --- a/client/windows/events_loop_p.h +++ b/client/windows/events_loop_p.h @@ -22,15 +22,17 @@ #include <vector> -class EventSource; +class EventSourceOld; class EventsLoop_p { public: - std::vector<EventSource*> _events; + class Trigger_p; +public: + std::vector<EventSourceOld*> _events; std::vector<HANDLE> _handles; }; -class Trigger_p { +class EventsLoop_p::Trigger_p { public: HANDLE get_handle() { return event;} |