In reply to verif_learner:
Sending an individual transaction should not take ‘forever’, so why would you fork two ‘forever’ threads? I would recommend having a discrete send_transaction() task that follows a linear process from start to finish without needing any forks.
Perhaps if you can describe what you are trying to accomplish in greater detail, we can provide an easier solution.