(blockId string, controller Controller)
| 95 | } |
| 96 | |
| 97 | func registerController(blockId string, controller Controller) { |
| 98 | var existingController Controller |
| 99 | |
| 100 | registryLock.Lock() |
| 101 | existing, exists := controllerRegistry[blockId] |
| 102 | if exists { |
| 103 | existingController = existing |
| 104 | } |
| 105 | controllerRegistry[blockId] = controller |
| 106 | registryLock.Unlock() |
| 107 | |
| 108 | if existingController != nil { |
| 109 | existingController.Stop(false, Status_Done, true) |
| 110 | wstore.DeleteRTInfo(waveobj.MakeORef(waveobj.OType_Block, blockId)) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | func deleteController(blockId string) { |
| 115 | registryLock.Lock() |
no test coverage detected