if I'm sharing an AtomicUsize between a lot of rust threads with the intention of using…
- User
if I'm sharing an AtomicUsize between a lot of rust threads with the intention of using it to record the order of their operations (so when I log a thread doing a thing, I use counter.fetch_add(1) as a sequence number), is the Ordering important? will using Relaxed bite me in the ass? I don't really understand Ordering
Assistant
Great question! Let me break this down for you:
For your specific use case of generating a sequence number across threads,
Relaxedordering is actually fine and won't "bite you in the ass". Here's why:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.