Thread Join Python Method Chaining Javascript