oklog/ulid

Why not make MonotonicRead thread safe?

Scratch-net opened this issue · 3 comments

It's easy to wrap it into a lock, isn't it? Or at least add such an option if speed is an issue. I could make a PR if it's ok with you

It's a speed consideration for sure. We expect users to be able to add synchronization if it's important. But a PR that adds a goroutine-safe option may be cool. What's your plan?

Feel free to reopen with details.

Wow.

This is a big problem if there are inexperienced but passionate people like me.

@peterbourgon, can I ask you for an example code to be safe when using ulid with various goroutines?