# tf_agents.system.multiprocessing.get_context

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/system/system_multiprocessing.py#L74-L88) |

Get a context: an object with the same API as multiprocessing module.

#### View aliases


**Main aliases**

[`tf_agents.system.system_multiprocessing.get_context`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/system/multiprocessing/get_context)

<br />

    tf_agents.system.multiprocessing.get_context(
        method: Text = None
    ) -> _multiprocessing.context.BaseContext

<br />

<br />

<br />

| ## Args ||
|---|---|
| `method` | (Optional.) The method name; a Google-safe default is provided. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A multiprocessing context. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `RuntimeError` | If main() was not executed via handle_main(). |

<br />