# How to pass parameters into a thread function

**URL:** <https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204>\
**Category:** Beginners\
**Created:** [January 19, 2021, 5:06pm UTC](https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204 "2021-01-19T17:06:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [January 19, 2021, 8:51pm UTC](https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204/2 "2021-01-19T20:51:16Z")

</div>

See

> [@Passing a parameter through a thread](https://discourse.processing.org/t/passing-a-parameter-through-a-thread/21498):
>
> Hi again everyone, currently stuck on a problem, I wish to create multiple threads to maximize cpu usage as I understand processing only uses the one thread by default, (perhaps this is java by default). I have done some research and converted a piece of code I found to work in processing. class A implements Runnable { String to\_print; int t; A(String to\_print) { this.to\_print = to\_print; } A(Integer t) { this.t = t; } //public void run() { // System.out.println(to\_p…

---

_[View the full topic](https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204)._
