File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed
ReactCommon/react/renderer/runtimescheduler Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -52,19 +52,19 @@ std::shared_ptr<Task> RuntimeScheduler::scheduleTask(
52
52
return task;
53
53
}
54
54
55
- bool RuntimeScheduler::getShouldYield () const {
55
+ bool RuntimeScheduler::getShouldYield () const noexcept {
56
56
return shouldYield_;
57
57
}
58
58
59
- void RuntimeScheduler::cancelTask (const std::shared_ptr<Task> &task) {
59
+ void RuntimeScheduler::cancelTask (const std::shared_ptr<Task> &task) noexcept {
60
60
task->callback .reset ();
61
61
}
62
62
63
- SchedulerPriority RuntimeScheduler::getCurrentPriorityLevel () const {
63
+ SchedulerPriority RuntimeScheduler::getCurrentPriorityLevel () const noexcept {
64
64
return currentPriority_;
65
65
}
66
66
67
- RuntimeSchedulerTimePoint RuntimeScheduler::now () const {
67
+ RuntimeSchedulerTimePoint RuntimeScheduler::now () const noexcept {
68
68
return now_ ();
69
69
}
70
70
Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ class RuntimeScheduler final {
22
22
RuntimeExecutor const &runtimeExecutor,
23
23
std::function<RuntimeSchedulerTimePoint()> now =
24
24
RuntimeSchedulerClock::now);
25
+ /*
26
+ * Not copyable.
27
+ */
28
+ RuntimeScheduler (RuntimeScheduler const &) = delete ;
29
+ RuntimeScheduler &operator =(RuntimeScheduler const &) = delete ;
30
+
31
+ /*
32
+ * Not movable.
33
+ */
34
+ RuntimeScheduler (RuntimeScheduler &&) = delete ;
35
+ RuntimeScheduler &operator =(RuntimeScheduler &&) = delete ;
25
36
26
37
void scheduleWork (std::function<void (jsi::Runtime &)> callback) const ;
27
38
@@ -39,13 +50,13 @@ class RuntimeScheduler final {
39
50
SchedulerPriority priority,
40
51
jsi::Function callback);
41
52
42
- void cancelTask (std::shared_ptr<Task> const &task);
53
+ void cancelTask (std::shared_ptr<Task> const &task) noexcept ;
43
54
44
- bool getShouldYield () const ;
55
+ bool getShouldYield () const noexcept ;
45
56
46
- SchedulerPriority getCurrentPriorityLevel () const ;
57
+ SchedulerPriority getCurrentPriorityLevel () const noexcept ;
47
58
48
- RuntimeSchedulerTimePoint now () const ;
59
+ RuntimeSchedulerTimePoint now () const noexcept ;
49
60
50
61
void setEnableYielding (bool enableYielding);
51
62
You can’t perform that action at this time.
0 commit comments