* Convert a string to a numeric hash for use as thread ID
(str: string)
| 126 | * Convert a string to a numeric hash for use as thread ID |
| 127 | */ |
| 128 | function stringToNumericHash(str: string): number { |
| 129 | return Math.abs(djb2Hash(str)) || 1 // Ensure non-zero |
| 130 | } |
| 131 | |
| 132 | /** |
| 133 | * Get or create a numeric process ID for an agent |
no test coverage detected