How to use your own ThreadFactory with Agent Runner¶
Problem¶
You need to use a specific ThreadFactory to manage threads in your process and want to schedule Agrona Agents.
Solution¶
Within the AgentRunner constructor, specify the ThreadFactory.
Sample¶
1 2 3 4 5 6 7 8 | |
Discussion¶
This is useful when you have a custom ThreadFactory that manages threads in a way particular to your application, for example by pinning the thread to a CPU core.