dmlc / dmlc/ps-lite

Van::GetTimestamp(), a bug or not?

Open
#82 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.6k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

include/ps/internal/van.h:

63 /**
64 * \brief get next available timestamp. thread safe
65 */
66 int GetTimestamp() { return timestamp_++; }

126 std::atomic timestamp_{0};

The implementation of GetTimestamp and its comment don't match. GetTimestamp doesn't get "next" availabe timestamp but the current logic timestamp.
Meanwhile timestamp_ is initialized as zero.
So the first call to GetTimestamp will return zero. Is it okay?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.