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