It was a good question
Let me elaborate for users who have the same question.
If you have two threads and each is using the GPIO just as set-pin-high-or-low, you have no problems providing the threads us different pins
But you may also have two threads using the same
pins or interface. For example you have an A-to-D converter which you read through one thread. Then you have a D-to-A converter which you control through a different thread. Now if both devices use the same interface (e.g. both use I2C or both use SPI) you have a problem. In that case you must use (or design) a common interface task/thread/driver which can support both threads.