Threading Python Queue Methods In Java