NewHandleStoreWithStartID creates a new handle store with custom start ID (for testing)
(startID int32)
| 20 | |
| 21 | // NewHandleStoreWithStartID creates a new handle store with custom start ID (for testing) |
| 22 | func newHandleStoreWithStartID(startID int32) *handleStore { |
| 23 | hs := &handleStore{} |
| 24 | hs.nextID.Store(startID) // start from custom ID, 0 is reserved as invalid |
| 25 | return hs |
| 26 | } |
| 27 | |
| 28 | // Store stores a value and returns int32 ID (safe for JS magic parameter) |
| 29 | func (hs *handleStore) Store(value interface{}) int32 { |