mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
Apply suggestion from @Ivansete-status
Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
This commit is contained in:
parent
800e497585
commit
94e00e7e25
@ -11,7 +11,7 @@ const DefaultBrokerContext* = BrokerContext(0xCAFFE14E'u32)
|
||||
|
||||
var gContextCounter: Atomic[uint32]
|
||||
|
||||
proc NewBrokerContext*(): BrokerContext =
|
||||
proc newBrokerContext*(): BrokerContext =
|
||||
var nextId = gContextCounter.fetchAdd(1, moRelaxed)
|
||||
if nextId == uint32(DefaultBrokerContext):
|
||||
nextId = gContextCounter.fetchAdd(1, moRelaxed)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user