Skip to content
This repository has been archived by the owner. It is now read-only.
This repository has been archived by the owner. It is now read-only.

Multi-thread safe #25

@krpot

Description

@krpot

I like your library and it's very readable and use to fun. One thing I am wondering is if there is any multi-thread issue because your implementation has one instance.

internal val calendar: Calendar by lazy {
Calendar.getInstance(DateHelper.getSydneyTimeZone())
}

From my understanding, lazy it doesn't create more than one instance and when thread1 and thread2 tries to update date, it think there could be a race condition. What do you think?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions