Returns the current task id, if any. Returns None if this process was not created by `fork_processes`.
()
| 177 | |
| 178 | |
| 179 | def task_id() -> Optional[int]: |
| 180 | """Returns the current task id, if any. |
| 181 | |
| 182 | Returns None if this process was not created by `fork_processes`. |
| 183 | """ |
| 184 | global _task_id |
| 185 | return _task_id |
| 186 | |
| 187 | |
| 188 | class Subprocess: |
no outgoing calls