@@ -135,7 +135,7 @@ class StreamingBatchScheduler : public BatchScheduler<TaskType> {
135
135
//
136
136
// A negative value means that no timeout will be enforced. This setting is
137
137
// useful in some test code.
138
- int64 batch_timeout_micros = 0 ;
138
+ int64_t batch_timeout_micros = 0 ;
139
139
140
140
// The name to use for the pool of batch threads.
141
141
string thread_pool_name = " batch_threads" ;
@@ -151,7 +151,7 @@ class StreamingBatchScheduler : public BatchScheduler<TaskType> {
151
151
152
152
// How long SingleTaskScheduler should wait if there are no scheduled tasks,
153
153
// in microseconds.
154
- uint64 no_tasks_wait_time_micros = 1000 ; // 1 millisecond
154
+ uint64_t no_tasks_wait_time_micros = 1000 ; // 1 millisecond
155
155
};
156
156
static Status Create (
157
157
const Options& options,
@@ -188,7 +188,7 @@ class StreamingBatchScheduler : public BatchScheduler<TaskType> {
188
188
// Takes a snapshot of 'open_batch_num_', and schedules an event with
189
189
// 'batch_closer_' to close it at time 'close_time_micros' if it is still open
190
190
// at that time.
191
- void ScheduleCloseOfCurrentOpenBatch (uint64 close_time_micros)
191
+ void ScheduleCloseOfCurrentOpenBatch (uint64_t close_time_micros)
192
192
TF_EXCLUSIVE_LOCKS_REQUIRED(mu_);
193
193
194
194
const Options options_;
@@ -209,7 +209,7 @@ class StreamingBatchScheduler : public BatchScheduler<TaskType> {
209
209
210
210
// The sequence number of 'open_batch_'. Incremented each time 'open_batch_'
211
211
// is assigned to a new (non-null) batch object.
212
- int64 open_batch_num_ TF_GUARDED_BY (mu_) = 0;
212
+ int64_t open_batch_num_ TF_GUARDED_BY (mu_) = 0;
213
213
214
214
// The number of batches "in progress", i.e. batches that have been started
215
215
// but for which the process-batch callback hasn't finished. Note that this
@@ -246,7 +246,7 @@ namespace internal {
246
246
class SingleTaskScheduler {
247
247
public:
248
248
SingleTaskScheduler (Env* env, string thread_name,
249
- uint64 no_tasks_wait_time_micros);
249
+ uint64_t no_tasks_wait_time_micros);
250
250
251
251
// Blocks until the currently-set closure (if any) runs.
252
252
~SingleTaskScheduler ();
@@ -256,7 +256,7 @@ class SingleTaskScheduler {
256
256
// cancels any closures provided in them (if they haven't already been run).
257
257
//
258
258
// IMPORTANT: 'time_micros' must be monotonically non-decreasing across calls.
259
- void Schedule (uint64 time_micros, std::function<void ()> closure);
259
+ void Schedule (uint64_t time_micros, std::function<void ()> closure);
260
260
261
261
private:
262
262
// The code executed in 'thread_'. Looks for updated tasks, and executes them
@@ -271,7 +271,7 @@ class SingleTaskScheduler {
271
271
272
272
// The arguments to Schedule().
273
273
struct Task {
274
- uint64 time_micros;
274
+ uint64_t time_micros;
275
275
std::function<void ()> closure;
276
276
};
277
277
@@ -280,7 +280,7 @@ class SingleTaskScheduler {
280
280
281
281
// The time parameter passed in the most recent Schedule() invocation.
282
282
// Used to enforce monotonicity.
283
- uint64 last_task_time_ = 0 ;
283
+ uint64_t last_task_time_ = 0 ;
284
284
285
285
// A notification for stopping the thread, during destruction.
286
286
Notification stop_;
@@ -292,7 +292,7 @@ class SingleTaskScheduler {
292
292
std::unique_ptr<Thread> thread_;
293
293
294
294
// How long to wait if there are no scheduled tasks, in microseconds.
295
- const uint64 no_tasks_wait_time_micros_;
295
+ const uint64_t no_tasks_wait_time_micros_;
296
296
297
297
TF_DISALLOW_COPY_AND_ASSIGN (SingleTaskScheduler);
298
298
};
@@ -363,7 +363,7 @@ Status StreamingBatchScheduler<TaskType>::Schedule(
363
363
// If we are about to add the first task to a batch, schedule the batch to
364
364
// be closed after the timeout.
365
365
if (options_.batch_timeout_micros > 0 && open_batch_->empty ()) {
366
- const uint64 batch_deadline =
366
+ const uint64_t batch_deadline =
367
367
options_.env ->NowMicros () + options_.batch_timeout_micros ;
368
368
ScheduleCloseOfCurrentOpenBatch (batch_deadline);
369
369
}
@@ -433,13 +433,13 @@ void StreamingBatchScheduler<TaskType>::StartNewBatch() {
433
433
434
434
template <typename TaskType>
435
435
void StreamingBatchScheduler<TaskType>::ScheduleCloseOfCurrentOpenBatch(
436
- uint64 close_time_micros) {
436
+ uint64_t close_time_micros) {
437
437
if (batch_closer_ == nullptr ) {
438
438
batch_closer_.reset (new internal::SingleTaskScheduler (
439
439
options_.env , " batch_closer" , options_.no_tasks_wait_time_micros ));
440
440
}
441
441
442
- const int64 batch_num_to_close = open_batch_num_;
442
+ const int64_t batch_num_to_close = open_batch_num_;
443
443
batch_closer_->Schedule (close_time_micros, [this , batch_num_to_close] {
444
444
{
445
445
mutex_lock l (this ->mu_ );
0 commit comments