FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rstudio/src/cpp/session/SessionClientEventQueue.hpp at master · UXScripts/rstudio · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
UXScripts
/
rstudio
Public
forked from
rstudio/rstudio
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
rstudio
/
src
/
cpp
/
session
/
SessionClientEventQueue.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
86 lines (63 loc) · 2.22 KB
Breadcrumbs
rstudio
/
src
/
cpp
/
session
/
SessionClientEventQueue.hpp
Copy path
File metadata and controls
86 lines (63 loc) · 2.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* SessionClientEventQueue.hpp
*
* Copyright (C) 2009-12 by RStudio, Inc.
*
* This program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
*
*/
#
ifndef
SESSION_SESSION_CLIENT_EVENT_QUEUE_HPP
#
define
SESSION_SESSION_CLIENT_EVENT_QUEUE_HPP
#
include
<
string
>
#
include
<
vector
>
#
include
<
boost/function.hpp
>
#
include
<
boost/utility.hpp
>
#
include
<
boost/date_time/posix_time/posix_time.hpp
>
#
include
<
core/BoostThread.hpp
>
#
include
<
session/SessionClientEvent.hpp
>
namespace
session
{
//
initialization
void
initializeClientEventQueue
();
//
singleton
class
ClientEventQueue
;
ClientEventQueue&
clientEventQueue
();
class
ClientEventQueue
: boost::noncopyable
{
private:
ClientEventQueue
() ;
friend
void
initializeClientEventQueue
();
public:
//
COPYING: boost::noncopyable
//
add an event
void
add
(
const
ClientEvent& event);
//
remove all available events
void
remove
(std::vector<ClientEvent>* pEvents);
//
are there any events pending?
bool
hasEvents
();
//
clear the event queue
void
clear
();
//
wait for a new event
bool
waitForEvent
(
const
boost::posix_time::time_duration& waitDuration);
//
has an event been added since the specified time
bool
eventAddedSince
(
const
boost::posix_time::ptime& time);
private:
void
flushPendingConsoleOutput
();
private:
//
synchronization objects. heap based so they are never destructed
//
we don't want them destructed because in desktop mode we don't
//
explicitly stop the queue and this sometimes results in mutex
//
destroy assertions if someone is waiting on the queue while
//
it is being destroyed
boost::mutex* pMutex_ ;
boost::condition* pWaitForEventCondition_ ;
//
instance data
std::string pendingConsoleOutput_ ;
std::vector<ClientEvent> pendingEvents_ ;
boost::posix_time::ptime lastEventAddTime_;
};
}
//
namespace session
#
endif
//
SESSION_SESSION_CLIENT_EVENT_QUEUE_HPP
Back
|
FazBrowse Home
|
New Git URL