获取dubbo的调用id :return:
()
| 100 | |
| 101 | |
| 102 | def get_invoke_id(): |
| 103 | """ |
| 104 | 获取dubbo的调用id |
| 105 | :return: |
| 106 | """ |
| 107 | global invoke_id |
| 108 | invoke_id_lock.acquire() |
| 109 | result = invoke_id |
| 110 | invoke_id += 1 |
| 111 | if invoke_id == maxsize: |
| 112 | invoke_id = 0 # 大于long的最大值则重置为0 |
| 113 | invoke_id_lock.release() |
| 114 | return result |
| 115 | |
| 116 | |
| 117 | if __name__ == '__main__': |
no outgoing calls
no test coverage detected